## What
Adds a `--verbose` option that shows the output of all underlying processes in real-time.
## Why
This is helpful for testing and debugging issues, especially issues that the community runs into. We can ask community members to pass the `--verbose` option and provide us with the outputted logs if they face problems.
## Caveats
When installing the Next.js starter then terminating the process, the main and child processes don't receive the abort signal as it seems to occur in the child process. This leads to the command continuing but then running into an error in the next step.
As this option is only used for debugging, I don't think it's a big issue.
## Testing
Run the `create-medusa-app` snapshot below with `--verbose` option. Or, change to the `packages/create-medusa-app` directory and run:
```bash
yarn dev --directory-path ~/some-dir --verbose
```
> The `--directory-path` option in this case is necessary as installing the medusa backend in the current `packages/create-medusa-app` directory leads to errors related to yarn workspaces.
## What
Added a `--v2` option to the `create-medusa-app` command that clones the [feat/v2](https://github.com/medusajs/medusa-starter-default/pull/150) branch of the starter default and makes minor changes to the setup process.
## Why
This option is supposed to make it easier to test out internally a Medusa setup with all the commerce modules. The starter's branch installs and configures the modules + the V2 feature flag.
## Testing
To test it out, run the snapshot with the `--v2` option.
## Notes
- I couldn't install the new admin dashboard in the starter branch as it's not on NPM yet (at the time of writing this), so at the moment, this opens the current admin dashboard instead.
- When trying to create an invite using the CLI tool I get the error `Unable to resolve inviteService`. Not sure if we should also make changes to the CLI tool to allow creating an invite when V2 is enabled (I know now invites are creating within the User Module, so maybe when the V2 feature flag is enabled that should be resolved instead), but for now I just disabled running the create invite command as this is mainly for internal testing. Let me know what the suggested approach is here.
**What**
- Move packages for `next` version of admin to core repo
**Other**
- Since this PR introduces packages that depend on Vite 5, it also introduces @types/node@^20. We have never had a direct dependency on the types package for Node, and as far as I can see that has resulted in us using the types from Node.js@8, as those are a dependency of one of our dependencies. With the introduction of @types/node@^20, two of our packages had TS errors because they were using the NodeJS.Timer type, which was deprecated in Node.js@14. We should add specific @types/node packages to all our packages, but I haven't done so in this PR to keep it as clean as possible.
- Q: @olivermrbl I've added the new packages to the ignore list for changeset, is this enough to prevent them from being published?
`create-medusa-app` currently prints a generic error message when it cannot connect to a database. This tiny pull request adds the thrown error to the log message, that simplifies debugging of installation issues
## What
Adds new options for easier usage of the `create-medusa-app` command for regular medusa users.
The following options are added:
- `--skip-db`: Skips creating the database, running migrations, and seeding, and subsequently skips opening the browser. Useful if the developer wants to set the database URL at a later point in the configurations.
- `--db-url <url>`: Skips database creation and sets the database URL to the provided URL. Throws an error if can't connect to the database. Will still run migrations and open the admin after project creation. Useful if the developer already has database created, locally or remotely.
- `--no-migrations`: Skips running migrations, creating admin user, and seeding. If used, it's expected that you pass the `--db-url` option with a url of a database that has all necessary migrations. Otherwise, unexpected errors will occur. Helpful only if combined with `--db-url`
- `--no-browser`: Disables opening the browser at the end of the project creation and only shows success message.
- `--directory-path <path>`: Allows specifying the directory path to install the project in. Useful for testing.
* feat(create-medusa-app): added stable option
* add new function
* changed open url
* switch condition
* fix open url for stable
* add URI encoding
* modified db error message
* feat(create-medusa-app): update command for a better onboarding experience
* use medusa-telemetry for tracking
* update used snapshot
* added changeset
* update yarn.lock
* increased facts timer
* updated snapshot version
* show facts throughout installation + add first_run to url
* added message after server termination
* print message only once
* added github to process terminated message
* address pr feedback
* added onboarding seeding
* fix for npm install
## What
- Removed the `seed` process and the `--no-seed` option from the `create-medusa-app` command
- Improved the success message to include details about creating the database and running migrations before starting the backend.
## Why
As of removing support for SQLite, the `seed` command does not work most of the time on installation since there's no database configured and the default one isn't created by the user yet. This leads to an error message showing during the installation which leads the user into thinking the setup went wrong.
Also, the steps after the installation is done successfully don't include anything related to the database, which means that when the user starts the backend they'll see errors.