From 2e42141822a9965ce7f2ceec9fad352ae9fd2c2e Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Tue, 1 Aug 2023 10:50:19 +0300 Subject: [PATCH] docs: shorten npx commands (#4652) --- docs/content/admin/onboarding.md | 4 ++-- docs/content/admin/quickstart.mdx | 4 ++-- docs/content/admin/routes.md | 2 +- docs/content/development/backend/directory-structure.md | 2 +- docs/content/development/backend/install.mdx | 4 ++-- docs/content/development/batch-jobs/create.mdx | 2 +- docs/content/development/cache/create.md | 2 +- docs/content/development/cache/modules/in-memory.md | 2 +- docs/content/development/cache/modules/redis.md | 2 +- docs/content/development/endpoints/create.md | 2 +- .../development/endpoints/example-logged-in-user.mdx | 2 +- docs/content/development/endpoints/extend-validator.md | 2 +- docs/content/development/entities/create.md | 2 +- docs/content/development/entities/extend-entity.md | 2 +- docs/content/development/entities/extend-repository.md | 2 +- docs/content/development/entities/migrations/create.md | 2 +- docs/content/development/entities/migrations/overview.mdx | 2 +- docs/content/development/events/create-module.md | 2 +- docs/content/development/events/modules/local.md | 2 +- docs/content/development/events/modules/redis.md | 2 +- docs/content/development/feature-flags/toggle.md | 2 +- .../development/file-service/create-file-service.md | 2 +- docs/content/development/loaders/create.md | 2 +- docs/content/development/modules/create.mdx | 2 +- .../notification/create-notification-provider.md | 2 +- docs/content/development/scheduled-jobs/create.md | 2 +- docs/content/development/search/create.md | 2 +- docs/content/development/services/extend-service.mdx | 2 +- docs/content/development/strategies/override-strategy.md | 2 +- .../backend/cart-completion-strategy.md | 2 +- docs/content/modules/multiwarehouse/install-modules.md | 4 ++-- .../backend/override-price-selection-strategy.md | 2 +- docs/content/modules/taxes/backend/create-tax-provider.md | 2 +- .../modules/taxes/backend/tax-calculation-strategy.md | 2 +- docs/content/plugins/analytics/segment.md | 2 +- .../plugins/cms/contentful/customize-contentful.md | 2 +- docs/content/plugins/cms/contentful/index.md | 2 +- docs/content/plugins/cms/strapi.md | 2 +- docs/content/plugins/file-service/s3.mdx | 2 +- docs/content/plugins/file-service/spaces.md | 2 +- docs/content/plugins/notifications/sendgrid.mdx | 2 +- docs/content/plugins/search/algolia.md | 2 +- docs/content/plugins/search/meilisearch.md | 2 +- docs/content/recipes/marketplace.mdx | 6 +++--- .../create-medusa-app-errors/_eagain-error.md | 8 ++++---- .../create-medusa-app-errors/_typeerror.md | 2 +- docs/content/troubleshooting/errors-after-update.md | 2 +- docs/content/troubleshooting/signing-in-to-admin.md | 2 +- docs/content/upgrade-guides/medusa-core/1-10-1.md | 2 +- docs/content/upgrade-guides/medusa-core/1-12-0.md | 2 +- docs/content/upgrade-guides/medusa-core/1-13-0.md | 2 +- docs/content/upgrade-guides/medusa-core/1-6-1.md | 2 +- docs/content/upgrade-guides/medusa-core/1-7-0.md | 2 +- docs/content/upgrade-guides/medusa-core/1-7-1.md | 2 +- docs/content/upgrade-guides/medusa-core/1-7-12.md | 2 +- docs/content/upgrade-guides/medusa-core/1-7-3.md | 2 +- docs/content/upgrade-guides/medusa-core/1-7-6.md | 2 +- docs/content/upgrade-guides/medusa-core/1-8-0.md | 2 +- docs/content/upgrade-guides/medusa-core/1-8-1.md | 2 +- docs/content/upgrade-guides/medusa-core/1-9-0.md | 2 +- 60 files changed, 69 insertions(+), 69 deletions(-) diff --git a/docs/content/admin/onboarding.md b/docs/content/admin/onboarding.md index 74e52099d7..884dc7a362 100644 --- a/docs/content/admin/onboarding.md +++ b/docs/content/admin/onboarding.md @@ -1231,7 +1231,7 @@ Finally, to reflect the migration in the database, run the `build` and `migratio ```bash npm2yarn npm run build -npx @medusajs/medusa-cli migrations run +npx medusa migrations run ``` You can learn more about migrations in [this guide](../development/entities/migrations/overview.mdx). @@ -2390,7 +2390,7 @@ You’ve now implemented everything necessary for the onboarding flow! You can t ```bash npm2yarn npm run build -npx @medusajs/medusa-cli develop +npx medusa develop ``` If you open the admin at `localhost:7001` and log in, you’ll see the onboarding widget in the Products listing page. You can try using it and see your implementation in action! diff --git a/docs/content/admin/quickstart.mdx b/docs/content/admin/quickstart.mdx index 845498a6e2..5bb24a66ad 100644 --- a/docs/content/admin/quickstart.mdx +++ b/docs/content/admin/quickstart.mdx @@ -101,7 +101,7 @@ If you disabled the `serve` option, you need to run the admin dashboard separate You can test the admin dashboard by running the following command in the directory of the Medusa backend: ```bash -npx @medusajs/medusa-cli develop +npx medusa develop ``` This starts the Medusa Backend and the admin dashboard. By default, the admin will be available on the URL `localhost:9000/app`. If you set the path option, then the admin will be available on `localhost:9000/` with `` being the value of the path option. @@ -144,7 +144,7 @@ Passwords in Medusa are hashed using the [scrypt-kdf](https://www.npmjs.com/pack To create a new admin user from the command line, run the following command in the directory holding your Medusa backend: ```bash -npx @medusajs/medusa-cli user -e some@email.com -p some-password +npx medusa user -e some@email.com -p some-password ``` This will create a new user that you can use to log into your admin panel. diff --git a/docs/content/admin/routes.md b/docs/content/admin/routes.md index a1e5d715ca..dfa65a8293 100644 --- a/docs/content/admin/routes.md +++ b/docs/content/admin/routes.md @@ -163,7 +163,7 @@ This will create an admin UI route at the path `/a/custom`, with its content bei To test your admin UI route, run the following command in the root directory of the Medusa backend project: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` This will build your admin and opens a window in your default browser to `localhost:7001`. After you log in, if you go to `localhost:7001/a/custom`, you’ll find the page you just created. diff --git a/docs/content/development/backend/directory-structure.md b/docs/content/development/backend/directory-structure.md index bcb229bcc8..26722cfd29 100644 --- a/docs/content/development/backend/directory-structure.md +++ b/docs/content/development/backend/directory-structure.md @@ -111,7 +111,7 @@ npm run seed This directory holds the transpiled Medusa backend customizations. This directory may not be available when you first install the Medusa backend. It’ll be available when you run the `build` command or start your Medusa backend with the `dev` command. -The files under this directory are the files that are used in your Medusa backend. So, when you make any changes under `src`, make sure the changes are transpiled into the `dist` directory. If you’re using the `dev` or `@medusajs/medusa-cli develop` commands, this is handled automatically whenever changes occur under the `src` directory. +The files under this directory are the files that are used in your Medusa backend. So, when you make any changes under `src`, make sure the changes are transpiled into the `dist` directory. If you’re using the `dev` or `medusa develop` commands, this is handled automatically whenever changes occur under the `src` directory. ### node_modules diff --git a/docs/content/development/backend/install.mdx b/docs/content/development/backend/install.mdx index 940df9b94f..5f30bea1d2 100644 --- a/docs/content/development/backend/install.mdx +++ b/docs/content/development/backend/install.mdx @@ -72,7 +72,7 @@ Make sure your PostgreSQL server is running before you run the Medusa backend. ```bash noReport cd my-medusa-store - medusa develop # or npx @medusajs/medusa-cli develop + medusa develop # or npx medusa develop ``` After these three steps and in only a couple of minutes, you now have a complete commerce engine running locally. You can test it out by sending a request using a tool like Postman or through the command line: @@ -121,7 +121,7 @@ For better testing, you can add demo data to your Medusa backend by running the ```bash medusa seed --seed-file=data/seed.json -# or npx @medusajs/medusa-cli seed --seed-file=data/seed.json +# or npx medusa seed --seed-file=data/seed.json ``` --- diff --git a/docs/content/development/batch-jobs/create.mdx b/docs/content/development/batch-jobs/create.mdx index 86ee79d7cc..354942a04a 100644 --- a/docs/content/development/batch-jobs/create.mdx +++ b/docs/content/development/batch-jobs/create.mdx @@ -279,7 +279,7 @@ npm run build This section covers how to test and use your batch job strategy. Make sure to start your backend first: ```bash -npx @medusajs/medusa-cli develop +npx medusa develop ``` You must also use an authenticated user to send batch job requests. You can refer to the [authentication guide in the API reference](/api/admin/#section/Authentication) for more details. diff --git a/docs/content/development/cache/create.md b/docs/content/development/cache/create.md index d5ebf0507b..54b06591c9 100644 --- a/docs/content/development/cache/create.md +++ b/docs/content/development/cache/create.md @@ -253,7 +253,7 @@ You can also add any necessary options to the module. The options added in the e Then, to test the module, run the Medusa backend which also runs your module: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` --- diff --git a/docs/content/development/cache/modules/in-memory.md b/docs/content/development/cache/modules/in-memory.md index 6c578158c2..6806cdda92 100644 --- a/docs/content/development/cache/modules/in-memory.md +++ b/docs/content/development/cache/modules/in-memory.md @@ -64,7 +64,7 @@ This registers the in-memory cache module as the main cache service to use. You To test the module, run the following command to start the Medusa backend: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` The backend should then start with no errors, indicating that the module was installed successfully. diff --git a/docs/content/development/cache/modules/redis.md b/docs/content/development/cache/modules/redis.md index 8c2aa499cd..3928456644 100644 --- a/docs/content/development/cache/modules/redis.md +++ b/docs/content/development/cache/modules/redis.md @@ -82,7 +82,7 @@ Other available options include: To test the module, run the following command to start the Medusa backend: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` If the module was installed successfully, you should see the following message in the logs: diff --git a/docs/content/development/endpoints/create.md b/docs/content/development/endpoints/create.md index e7bede18a7..ae46408831 100644 --- a/docs/content/development/endpoints/create.md +++ b/docs/content/development/endpoints/create.md @@ -360,7 +360,7 @@ The `productService` has a `count` method that returns a Promise. This Promi ## Building Files -Custom endpoints must be transpiled and moved to the `dist` directory before you can start consuming them. When you run your backend using either the `medusa develop` or `npx @medusajs/medusa-cli develop` commands, it watches the files under `src` for any changes, then triggers the `build` command and restarts the server. +Custom endpoints must be transpiled and moved to the `dist` directory before you can start consuming them. When you run your backend using either the `medusa develop` or `npx medusa develop` commands, it watches the files under `src` for any changes, then triggers the `build` command and restarts the server. The build isn't triggered though when the backend first starts running. So, make sure to run the `build` command before starting the backend: diff --git a/docs/content/development/endpoints/example-logged-in-user.mdx b/docs/content/development/endpoints/example-logged-in-user.mdx index 3f4247f88f..be305c434e 100644 --- a/docs/content/development/endpoints/example-logged-in-user.mdx +++ b/docs/content/development/endpoints/example-logged-in-user.mdx @@ -197,7 +197,7 @@ npm run build Then, run your backend with the following command: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` If you try accessing the endpoints you added the middleware to, you should see your implementation working as expected. diff --git a/docs/content/development/endpoints/extend-validator.md b/docs/content/development/endpoints/extend-validator.md index c31822ad59..75838868f1 100644 --- a/docs/content/development/endpoints/extend-validator.md +++ b/docs/content/development/endpoints/extend-validator.md @@ -77,7 +77,7 @@ To test out your extended validator, build and start your Medusa backend: ```bash npm2yarn npm run build -npx @medusajs/medusa-cli develop +npx medusa develop ``` Then, send a request to the endpoint you extended passing it your custom fields. To test out the example in this guide, send an [authenticated request](/api/admin#section/Authentication) to the [Create Product endpoint](https://docs.medusajs.com/api/admin#tag/Products/operation/PostProducts) and pass it the `custom_field` body parameter. The request should execute with no errors. diff --git a/docs/content/development/entities/create.md b/docs/content/development/entities/create.md index 76ec5dca98..1f65fa94ab 100644 --- a/docs/content/development/entities/create.md +++ b/docs/content/development/entities/create.md @@ -123,7 +123,7 @@ npm run build Then, run the `migration` command: ```bash -npx @medusajs/medusa-cli migrations run +npx medusa migrations run ``` You should see that your migration have executed. diff --git a/docs/content/development/entities/extend-entity.md b/docs/content/development/entities/extend-entity.md index 9f847f7240..884ba79de1 100644 --- a/docs/content/development/entities/extend-entity.md +++ b/docs/content/development/entities/extend-entity.md @@ -109,7 +109,7 @@ npm run build Then, run the following command to migrate your changes to the database: ```bash -npx @medusajs/medusa-cli migrations run +npx medusa migrations run ``` You should see that your migration was executed, which means your changes were reflected in the database schema. diff --git a/docs/content/development/entities/extend-repository.md b/docs/content/development/entities/extend-repository.md index a9f937a891..237324cc7c 100644 --- a/docs/content/development/entities/extend-repository.md +++ b/docs/content/development/entities/extend-repository.md @@ -125,7 +125,7 @@ npm run build Then, run the following command to start your backend: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` You should see your custom implementation working as expected. diff --git a/docs/content/development/entities/migrations/create.md b/docs/content/development/entities/migrations/create.md index e01c94532f..a85d8a7362 100644 --- a/docs/content/development/entities/migrations/create.md +++ b/docs/content/development/entities/migrations/create.md @@ -90,7 +90,7 @@ npm run build The last step is to run the migration with the command detailed earlier ```bash -npx @medusajs/medusa-cli migrations run +npx medusa migrations run ``` If you check your database now you should see that the change defined by the migration has been applied successfully. diff --git a/docs/content/development/entities/migrations/overview.mdx b/docs/content/development/entities/migrations/overview.mdx index 1f5df94614..c60fceb6bb 100644 --- a/docs/content/development/entities/migrations/overview.mdx +++ b/docs/content/development/entities/migrations/overview.mdx @@ -32,7 +32,7 @@ Migrations are used to apply changes to the database schema. However, there are Using the Medusa CLI tool, you can run migrations with the following command: ```bash -npx @medusajs/medusa-cli migrations run +npx medusa migrations run ``` This will check for any migrations that contain changes to your database schema that aren't applied yet and run them on your backend. diff --git a/docs/content/development/events/create-module.md b/docs/content/development/events/create-module.md index 3e43c24675..d20809087e 100644 --- a/docs/content/development/events/create-module.md +++ b/docs/content/development/events/create-module.md @@ -248,7 +248,7 @@ You can also add any necessary options to the module. Then, to test the module, run the Medusa backend which also runs your module: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` --- diff --git a/docs/content/development/events/modules/local.md b/docs/content/development/events/modules/local.md index 6a52536eb1..882ec9c8c2 100644 --- a/docs/content/development/events/modules/local.md +++ b/docs/content/development/events/modules/local.md @@ -58,7 +58,7 @@ This registers the local events module as the main events service to use. This m To test the module, run the following command to start the Medusa backend: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` If the module was installed successfully, you should see the following message in the logs: diff --git a/docs/content/development/events/modules/redis.md b/docs/content/development/events/modules/redis.md index 1f1a5f6cd3..8552f01582 100644 --- a/docs/content/development/events/modules/redis.md +++ b/docs/content/development/events/modules/redis.md @@ -85,7 +85,7 @@ Other available options include: To test the module, run the following command to start the Medusa backend: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` If the module was installed successfully, you should see the following message in the logs: diff --git a/docs/content/development/feature-flags/toggle.md b/docs/content/development/feature-flags/toggle.md index 6d2413ca9c..5de80356d3 100644 --- a/docs/content/development/feature-flags/toggle.md +++ b/docs/content/development/feature-flags/toggle.md @@ -59,7 +59,7 @@ For example, if the value of the environment variable is set to `false`, but the As feature flags generally include adding new entities or making changes to entities in the database, you must run the migrations after enabling the feature flag: ```bash -npx @medusajs/medusa-cli migrations run +npx medusa migrations run ``` :::info diff --git a/docs/content/development/file-service/create-file-service.md b/docs/content/development/file-service/create-file-service.md index 39105e915f..5ffa55fe17 100644 --- a/docs/content/development/file-service/create-file-service.md +++ b/docs/content/development/file-service/create-file-service.md @@ -397,7 +397,7 @@ This section explains how to test out your implementation if the file service wa Run your backend to test it out: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` Then, try uploading a file, for example, using the [Upload File endpoint](/api/admin#tag/Uploads/operation/PostUploads). The file should be uploaded based on the logic you’ve implemented. diff --git a/docs/content/development/loaders/create.md b/docs/content/development/loaders/create.md index 0153f19766..5102e86e30 100644 --- a/docs/content/development/loaders/create.md +++ b/docs/content/development/loaders/create.md @@ -80,7 +80,7 @@ This section explains how to test out the loader if it’s created in the Medusa Run the following command to start the Medusa backend: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` Your loader script should run on the Medusa backend startup. If you logged a message in the console, similar to the example above, you should see it in the console. diff --git a/docs/content/development/modules/create.mdx b/docs/content/development/modules/create.mdx index e914f73e09..6642971498 100644 --- a/docs/content/development/modules/create.mdx +++ b/docs/content/development/modules/create.mdx @@ -293,7 +293,7 @@ The `resources` property can have one of the following values: Finally, to test your module, run the following command: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` This starts the Medusa backend and runs your module as part of it. diff --git a/docs/content/development/notification/create-notification-provider.md b/docs/content/development/notification/create-notification-provider.md index 1eab9cd1b8..24fbaa5e46 100644 --- a/docs/content/development/notification/create-notification-provider.md +++ b/docs/content/development/notification/create-notification-provider.md @@ -306,7 +306,7 @@ npm run build Next, start your Medusa backend: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` Try now to place an order either using the [REST APIs](/api/store) or using the storefront. diff --git a/docs/content/development/scheduled-jobs/create.md b/docs/content/development/scheduled-jobs/create.md index 2725acdb5e..bb9d4606e3 100644 --- a/docs/content/development/scheduled-jobs/create.md +++ b/docs/content/development/scheduled-jobs/create.md @@ -146,7 +146,7 @@ npm run build Then, run the following command to start your Medusa backend: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` If the scheduled job was registered successfully, you should see a message similar to this logged on your Medusa backend: diff --git a/docs/content/development/search/create.md b/docs/content/development/search/create.md index fb0cef6131..cb659ad540 100644 --- a/docs/content/development/search/create.md +++ b/docs/content/development/search/create.md @@ -403,7 +403,7 @@ This section explains how to test out your implementation if the search service Run your backend to test it out: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` You can then send a request to the [Search Products endpoint](/api/store#tag/Products/operation/PostProductsSearch) to see if your search service returns any results. diff --git a/docs/content/development/services/extend-service.mdx b/docs/content/development/services/extend-service.mdx index 660f43a0f3..4925cc09ad 100644 --- a/docs/content/development/services/extend-service.mdx +++ b/docs/content/development/services/extend-service.mdx @@ -83,7 +83,7 @@ npm run build Then, start the backend: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` You should see the customizations you made in effect. diff --git a/docs/content/development/strategies/override-strategy.md b/docs/content/development/strategies/override-strategy.md index c8ef7336d8..de46be0ffd 100644 --- a/docs/content/development/strategies/override-strategy.md +++ b/docs/content/development/strategies/override-strategy.md @@ -73,7 +73,7 @@ npm run build Run your backend to test it out: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` You can test now whether your strategy is working by performing the actions that run your strategy. diff --git a/docs/content/modules/carts-and-checkout/backend/cart-completion-strategy.md b/docs/content/modules/carts-and-checkout/backend/cart-completion-strategy.md index daec37f281..ede65c9926 100644 --- a/docs/content/modules/carts-and-checkout/backend/cart-completion-strategy.md +++ b/docs/content/modules/carts-and-checkout/backend/cart-completion-strategy.md @@ -117,7 +117,7 @@ npm run build Run your backend to test it out: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` Then, try out your strategy using the Complete Cart endpoint. You should see the logic you implemented used for completing the cart. diff --git a/docs/content/modules/multiwarehouse/install-modules.md b/docs/content/modules/multiwarehouse/install-modules.md index 5b1e86738d..c18aa12393 100644 --- a/docs/content/modules/multiwarehouse/install-modules.md +++ b/docs/content/modules/multiwarehouse/install-modules.md @@ -43,7 +43,7 @@ module.exports = { Run the following command to reflect schema changes into your database: ```bash -npx @medusajs/medusa-cli migrations run +npx medusa migrations run ``` ### Step 4: Run Migration Script @@ -83,7 +83,7 @@ module.exports = { Run the following command to reflect schema changes into your database: ```bash -npx @medusajs/medusa-cli migrations run +npx medusa migrations run ``` ### Step 4: Run Migration Script diff --git a/docs/content/modules/price-lists/backend/override-price-selection-strategy.md b/docs/content/modules/price-lists/backend/override-price-selection-strategy.md index 8fb2011b4a..c2f7cb3bd7 100644 --- a/docs/content/modules/price-lists/backend/override-price-selection-strategy.md +++ b/docs/content/modules/price-lists/backend/override-price-selection-strategy.md @@ -122,7 +122,7 @@ npm run build Run your backend to test it out: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` Then, try out your strategy using any of the [Products](/api/store/#tag/Product) or [Carts](/api/store/#tag/Cart) endpoints which include retrieving product variants and line items respectively. You should then see the prices in the response based on your implemented strategy. diff --git a/docs/content/modules/taxes/backend/create-tax-provider.md b/docs/content/modules/taxes/backend/create-tax-provider.md index 83d452354e..853098ddbb 100644 --- a/docs/content/modules/taxes/backend/create-tax-provider.md +++ b/docs/content/modules/taxes/backend/create-tax-provider.md @@ -202,7 +202,7 @@ npm run build Run your backend to test it out: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` Before you can test out your tax provider, you must enable it in a region. You can do that either using the [Medusa Admin dashboard](../../../user-guide/taxes/manage.md#change-tax-provider) or using the [Update Region admin endpoint](../admin/manage-tax-settings.mdx#change-tax-provider-of-a-region). diff --git a/docs/content/modules/taxes/backend/tax-calculation-strategy.md b/docs/content/modules/taxes/backend/tax-calculation-strategy.md index 337a0c9983..a187f77fbe 100644 --- a/docs/content/modules/taxes/backend/tax-calculation-strategy.md +++ b/docs/content/modules/taxes/backend/tax-calculation-strategy.md @@ -120,7 +120,7 @@ npm run build Run your backend to test it out: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` To test it out, you can simulate a checkout flow and check the calculated taxes to see if it matches the logic you implemented in the `calculate` method. diff --git a/docs/content/plugins/analytics/segment.md b/docs/content/plugins/analytics/segment.md index d664097073..e25c477cb0 100644 --- a/docs/content/plugins/analytics/segment.md +++ b/docs/content/plugins/analytics/segment.md @@ -130,7 +130,7 @@ const plugins = [ Run your backend with the following command: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` Then, try triggering one of the [mentioned events earlier in this document](#events-that-the-segment-plugin-tracks). For example, you can place an order either using the [REST APIs](https://docs.medusajs.com/api/store) or using the [Next.js Starter Template](../../starters/nextjs-medusa-starter.mdx). diff --git a/docs/content/plugins/cms/contentful/customize-contentful.md b/docs/content/plugins/cms/contentful/customize-contentful.md index 71cff58dad..bae4f7c365 100644 --- a/docs/content/plugins/cms/contentful/customize-contentful.md +++ b/docs/content/plugins/cms/contentful/customize-contentful.md @@ -251,7 +251,7 @@ export const query = graphql` To test this out, run your Medusa backend by running this command in its directory: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` Then run the Gatsby storefront by running this command in its directory: diff --git a/docs/content/plugins/cms/contentful/index.md b/docs/content/plugins/cms/contentful/index.md index 735658d636..e90b17c64c 100644 --- a/docs/content/plugins/cms/contentful/index.md +++ b/docs/content/plugins/cms/contentful/index.md @@ -164,7 +164,7 @@ npm run seed To start the backend run the following command: ```bash -npx @medusajs/medusa-cli develop +npx medusa develop ``` If you seeded the database with demo data, you should see that events related to the products are triggered. diff --git a/docs/content/plugins/cms/strapi.md b/docs/content/plugins/cms/strapi.md index ae40863660..d16624577c 100644 --- a/docs/content/plugins/cms/strapi.md +++ b/docs/content/plugins/cms/strapi.md @@ -175,7 +175,7 @@ npm run develop Then, in the directory of your Medusa backend, run the following command to start the Medusa backend: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` Once you start your Medusa backend, if you ran the `--seed` command when you created your Medusa backend, you’ll see that `product.created` events have been triggered along with similar events. This will update Strapi with the products you seeded. diff --git a/docs/content/plugins/file-service/s3.mdx b/docs/content/plugins/file-service/s3.mdx index e29a5a89e1..2c554ac394 100644 --- a/docs/content/plugins/file-service/s3.mdx +++ b/docs/content/plugins/file-service/s3.mdx @@ -178,7 +178,7 @@ Make sure to define `S3_CUSTOM_AGENT` in your environment variables first. Run your Medusa backend with the following command: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` Then, you can either test the plugin using the [REST APIs](/api/store) or using the [Medusa Admin](../../admin/quickstart.mdx). diff --git a/docs/content/plugins/file-service/spaces.md b/docs/content/plugins/file-service/spaces.md index d29d0077be..b5b65c4b01 100644 --- a/docs/content/plugins/file-service/spaces.md +++ b/docs/content/plugins/file-service/spaces.md @@ -137,7 +137,7 @@ If you have multiple storage plugins configured, the last plugin declared in the Run your Medusa backend with the following command: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` Then, you can either test the plugin using the [REST APIs](/api/store) or using the [Medusa Admin](../../admin/quickstart.mdx). diff --git a/docs/content/plugins/notifications/sendgrid.mdx b/docs/content/plugins/notifications/sendgrid.mdx index 13028d6d1d..5018cf0ad2 100644 --- a/docs/content/plugins/notifications/sendgrid.mdx +++ b/docs/content/plugins/notifications/sendgrid.mdx @@ -3962,7 +3962,7 @@ You can also optionally pass the option `localization` if you want to support di Run your backend now: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` To test it out, perform an action that would trigger one of the emails being sent. For example, you can use your Medusa storefront to create an order. An email from your SendGrid account will be sent to the customer email. diff --git a/docs/content/plugins/search/algolia.md b/docs/content/plugins/search/algolia.md index 486d7cfc73..932d54b7ff 100644 --- a/docs/content/plugins/search/algolia.md +++ b/docs/content/plugins/search/algolia.md @@ -194,7 +194,7 @@ const plugins = [ Run your Medusa backend with the following command: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` The quickest way to test that the integration is working is by sending a `POST` request to `/store/products/search`. This endpoint accepts a `q` body parameter of the query to search for and returns in the result the products that match this query. diff --git a/docs/content/plugins/search/meilisearch.md b/docs/content/plugins/search/meilisearch.md index 44d87613cf..1b9890de66 100644 --- a/docs/content/plugins/search/meilisearch.md +++ b/docs/content/plugins/search/meilisearch.md @@ -161,7 +161,7 @@ Make sure your MeiliSearch instance is running. If you’re unsure how to run it Then, run the Medusa backend: ```bash npm2yarn -npx @medusajs/medusa-cli develop +npx medusa develop ``` The quickest way to test that the integration is working is by sending a `POST` request to `/store/products/search`. This endpoint accepts a `q` body parameter of the query to search for and returns in the result the products that match this query. diff --git a/docs/content/recipes/marketplace.mdx b/docs/content/recipes/marketplace.mdx index 52fed038c0..edee059014 100644 --- a/docs/content/recipes/marketplace.mdx +++ b/docs/content/recipes/marketplace.mdx @@ -130,7 +130,7 @@ To associate these entities with the `Store` entity, you need to extend and cust ```bash npm2yarn npm run build - npx @medusajs/medusa-cli migrations run + npx medusa migrations run ``` You can extend other entities in a similar manner to associate them with a store. @@ -241,7 +241,7 @@ You can also extend services if you need to customize a functionality implemente ```bash npm run build - npx @medusajs/medusa-cli develop + npx medusa develop ``` @@ -288,7 +288,7 @@ To listen to events, you need to create Subscribers that subscribe a handler met ```bash npm run build - npx @medusajs/medusa-cli develop + npx medusa develop ``` diff --git a/docs/content/troubleshooting/create-medusa-app-errors/_eagain-error.md b/docs/content/troubleshooting/create-medusa-app-errors/_eagain-error.md index edd716724e..1375489a7c 100644 --- a/docs/content/troubleshooting/create-medusa-app-errors/_eagain-error.md +++ b/docs/content/troubleshooting/create-medusa-app-errors/_eagain-error.md @@ -17,23 +17,23 @@ npm run build 3\. Run migrations: ```bash -npx @medusajs/medusa-cli migrations run +npx medusa migrations run ``` 4\. Create an admin user: ```bash -npx @medusajs/medusa-cli user -e user@test.com -p supersecret +npx medusa user -e user@test.com -p supersecret ``` 5\. Optionally seed the database: ```bash -npx @medusajs/medusa-cli seed -f ./data/seed.json +npx medusa seed -f ./data/seed.json ``` 6\. Start project: ```bash -npx @medusajs/medusa-cli develop +npx medusa develop ``` diff --git a/docs/content/troubleshooting/create-medusa-app-errors/_typeerror.md b/docs/content/troubleshooting/create-medusa-app-errors/_typeerror.md index a9ff12fbdc..728b1cc775 100644 --- a/docs/content/troubleshooting/create-medusa-app-errors/_typeerror.md +++ b/docs/content/troubleshooting/create-medusa-app-errors/_typeerror.md @@ -4,5 +4,5 @@ To resolve this issue, make sure you change into the `backend` directory of the ```bash npm2yarn cd backend -npx @medusajs/medusa-cli develop +npx medusa develop ``` \ No newline at end of file diff --git a/docs/content/troubleshooting/errors-after-update.md b/docs/content/troubleshooting/errors-after-update.md index 9137faddd5..8c48fc615d 100644 --- a/docs/content/troubleshooting/errors-after-update.md +++ b/docs/content/troubleshooting/errors-after-update.md @@ -7,7 +7,7 @@ If you run into errors after updating Medusa and its dependencies, it's highly r If there's no upgrade guide for your version, make sure that you ran the `migrations` command in the root directory of your Medusa backend: ```bash -npx @medusajs/medusa-cli migrations run +npx medusa migrations run ``` This ensures your backend has the latest database structure required. Then, try running your Medusa backend again and check whether the same error occurs. diff --git a/docs/content/troubleshooting/signing-in-to-admin.md b/docs/content/troubleshooting/signing-in-to-admin.md index ec4dc526a8..b6d4a28208 100644 --- a/docs/content/troubleshooting/signing-in-to-admin.md +++ b/docs/content/troubleshooting/signing-in-to-admin.md @@ -12,7 +12,7 @@ password: supersecret Alternatively, you can create your own users using the Medusa CLI tool: ```bash -npx @medusajs/medusa-cli user -e some@email.com -p somepassword +npx medusa user -e some@email.com -p somepassword ``` --- diff --git a/docs/content/upgrade-guides/medusa-core/1-10-1.md b/docs/content/upgrade-guides/medusa-core/1-10-1.md index 62324d8cd7..84a9a87481 100644 --- a/docs/content/upgrade-guides/medusa-core/1-10-1.md +++ b/docs/content/upgrade-guides/medusa-core/1-10-1.md @@ -33,5 +33,5 @@ To avoid unexpected issues with dependencies, it is also recommended to update a After updating your Medusa server and before running it, run the following command to run the latest migrations: ```bash -npx @medusajs/medusa-cli migrations run +npx medusa migrations run ``` diff --git a/docs/content/upgrade-guides/medusa-core/1-12-0.md b/docs/content/upgrade-guides/medusa-core/1-12-0.md index 59e0d0fdb0..379550f619 100644 --- a/docs/content/upgrade-guides/medusa-core/1-12-0.md +++ b/docs/content/upgrade-guides/medusa-core/1-12-0.md @@ -75,7 +75,7 @@ To avoid unexpected issues with dependencies, it is also recommended to update a After updating your Medusa server and before running it, run the following command to run the latest migrations: ```bash -npx @medusajs/medusa-cli migrations run +npx medusa migrations run ``` ### Change PriceSelectionStrategy method diff --git a/docs/content/upgrade-guides/medusa-core/1-13-0.md b/docs/content/upgrade-guides/medusa-core/1-13-0.md index 5d421863a1..060a936920 100644 --- a/docs/content/upgrade-guides/medusa-core/1-13-0.md +++ b/docs/content/upgrade-guides/medusa-core/1-13-0.md @@ -33,5 +33,5 @@ To avoid unexpected issues with dependencies, it is also recommended to update a After updating your Medusa server and before running it, run the following command to run the latest migrations: ```bash -npx @medusajs/medusa-cli migrations run +npx medusa migrations run ``` diff --git a/docs/content/upgrade-guides/medusa-core/1-6-1.md b/docs/content/upgrade-guides/medusa-core/1-6-1.md index 9750ed331a..5808e091ee 100644 --- a/docs/content/upgrade-guides/medusa-core/1-6-1.md +++ b/docs/content/upgrade-guides/medusa-core/1-6-1.md @@ -19,5 +19,5 @@ Without running the migrations, you might have trouble accessing and using the M After updating your backend, run migrations with the following command: ```bash -npx @medusajs/medusa-cli migrations run +npx medusa migrations run ``` diff --git a/docs/content/upgrade-guides/medusa-core/1-7-0.md b/docs/content/upgrade-guides/medusa-core/1-7-0.md index 5182a2a081..4b4267d848 100644 --- a/docs/content/upgrade-guides/medusa-core/1-7-0.md +++ b/docs/content/upgrade-guides/medusa-core/1-7-0.md @@ -21,7 +21,7 @@ In addition, after introducing the Claim Order feature, this version of Medusa i Run the following command to run migrations: ```bash -npx @medusajs/medusa-cli migrations run +npx medusa migrations run ``` ### Change Used Methods diff --git a/docs/content/upgrade-guides/medusa-core/1-7-1.md b/docs/content/upgrade-guides/medusa-core/1-7-1.md index 6b3949ee78..7220de5180 100644 --- a/docs/content/upgrade-guides/medusa-core/1-7-1.md +++ b/docs/content/upgrade-guides/medusa-core/1-7-1.md @@ -23,7 +23,7 @@ In addition, this version features some fixes to gift cards that requires runnin In the directory of your Medusa backend, run the following command after updating the backend: ```bash -npx @medusajs/medusa-cli migrations run +npx medusa migrations run ``` ### Run Migration Script diff --git a/docs/content/upgrade-guides/medusa-core/1-7-12.md b/docs/content/upgrade-guides/medusa-core/1-7-12.md index 08403b2479..60cf93d2c1 100644 --- a/docs/content/upgrade-guides/medusa-core/1-7-12.md +++ b/docs/content/upgrade-guides/medusa-core/1-7-12.md @@ -33,5 +33,5 @@ It's also recommended to update any other Medusa plugins or packages you have in After updating your Medusa server and before running it, run the following command to run the latest migrations: ```bash -npx @medusajs/medusa-cli migrations run +npx medusa migrations run ``` diff --git a/docs/content/upgrade-guides/medusa-core/1-7-3.md b/docs/content/upgrade-guides/medusa-core/1-7-3.md index 699aafd163..8a6257536e 100644 --- a/docs/content/upgrade-guides/medusa-core/1-7-3.md +++ b/docs/content/upgrade-guides/medusa-core/1-7-3.md @@ -21,7 +21,7 @@ Version 1.7.3 of Medusa keeps the feature flags for these two features, but they After updating your Medusa backend and before running it, run the following command to run the latest migration: ```bash -npx @medusajs/medusa-cli migrations run +npx medusa migrations run ``` ### Run Migration Script for Sales Channels diff --git a/docs/content/upgrade-guides/medusa-core/1-7-6.md b/docs/content/upgrade-guides/medusa-core/1-7-6.md index fff3564600..1f97b57370 100644 --- a/docs/content/upgrade-guides/medusa-core/1-7-6.md +++ b/docs/content/upgrade-guides/medusa-core/1-7-6.md @@ -35,5 +35,5 @@ It's also recommended to update any other Medusa plugins or packages you have in After updating your Medusa backend and before running it, run the following command to run the latest migrations: ```bash -npx @medusajs/medusa-cli migrations run +npx medusa migrations run ``` diff --git a/docs/content/upgrade-guides/medusa-core/1-8-0.md b/docs/content/upgrade-guides/medusa-core/1-8-0.md index c09ff8e2b3..8b8ed47f7f 100644 --- a/docs/content/upgrade-guides/medusa-core/1-8-0.md +++ b/docs/content/upgrade-guides/medusa-core/1-8-0.md @@ -85,5 +85,5 @@ Make sure to replace `your-redis-url` with the connection URL to your Redis inst Finally, you should run migrations to ensure your database is up to date with our schema changes: ```bash -npx @medusajs/medusa-cli migrations run +npx medusa migrations run ``` diff --git a/docs/content/upgrade-guides/medusa-core/1-8-1.md b/docs/content/upgrade-guides/medusa-core/1-8-1.md index 5a1adfd9e6..f242b90c98 100644 --- a/docs/content/upgrade-guides/medusa-core/1-8-1.md +++ b/docs/content/upgrade-guides/medusa-core/1-8-1.md @@ -33,5 +33,5 @@ It's also recommended to update any other Medusa plugins or packages you have in After updating your Medusa backend and before running it, run the following command to run the latest migrations: ```bash -npx @medusajs/medusa-cli migrations run +npx medusa migrations run ``` diff --git a/docs/content/upgrade-guides/medusa-core/1-9-0.md b/docs/content/upgrade-guides/medusa-core/1-9-0.md index 652c33f66e..28a9d0828c 100644 --- a/docs/content/upgrade-guides/medusa-core/1-9-0.md +++ b/docs/content/upgrade-guides/medusa-core/1-9-0.md @@ -45,5 +45,5 @@ It's also recommended to update any other Medusa plugins or packages you have in After updating your Medusa backend and before running it, run the following command to run the latest migrations: ```bash -npx @medusajs/medusa-cli migrations run +npx medusa migrations run ```