thefrontside / simulacrum

A simulation platform for use during testing, during development and for high-fidelity application previews
85 stars 14 forks source link

Allow starting auth0 simulator via CLI without explicitly using GraphQL #146

Open taras opened 2 years ago

taras commented 2 years ago

Context

I'm working on Auth0 Simulator blog post and I'm hit a point where I need to introduce the simulator. I'm finding the current onboarding experience to be a bit of a leap. I would like to be very simple. I want to be able to say run npx @simulacrum/auth0-simulator start to start your simulator. Instead, I need to give them a bunch of steps on how to start the simulator.

Request

Let's make it possible to start the auth0-simulator without having to run GraphQL. We can later tell people about GraphQL when they have a reason to use it. I propose that we add the following,

  1. add start command to @simulacrum/auth0-simulator bin that will automatically execute the createSimulation mutation.
  2. start command should take --audience, --scope and clientId arguments. We should make sure that #124 is not going to cause a problem for people

Unknown questions

  1. Should we allow to automatically create some predefined users so developers could use it for local development?
cowboyd commented 2 years ago

💯 on the one-shot transactional CLI

dagda1 commented 2 years ago
  • In answer to (1), I think that we should have a --scenario flag that will specify an initial scenario that is used when

we had that on the resideo simulator to point to a file

also a --port flag to choose where to run it.

We allowed the whole url to be replaced. I think we need this for mobile simulators