From 7da6cc961e9c7417abda7e894e7c035d681e4b4e Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Mon, 15 May 2023 11:04:14 +0300 Subject: [PATCH] docs: used the NPX CLI tool across docs (#4099) --- docs/content/admin/quickstart.mdx | 6 +++--- .../content/deployments/admin/deploying-on-vercel.md | 2 +- .../storefront/deploying-gatsby-on-netlify.md | 4 ++-- docs/content/development/backend/configurations.md | 2 +- docs/content/development/batch-jobs/create.mdx | 4 ++-- docs/content/development/cache/create.md | 2 +- docs/content/development/cache/modules/in-memory.md | 2 +- docs/content/development/cache/modules/redis.md | 2 +- .../development/endpoints/example-logged-in-user.md | 2 +- .../development/entities/extend-repository.md | 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 | 12 +++++++++--- docs/content/development/scheduled-jobs/create.md | 2 +- docs/content/development/search/create.md | 2 +- docs/content/development/services/extend-service.md | 2 +- .../development/strategies/override-strategy.md | 2 +- docs/content/js-client/overview.md | 2 +- docs/content/medusa-react/overview.md | 6 +++--- .../backend/cart-completion-strategy.md | 2 +- .../modules/multiwarehouse/install-modules.md | 4 ++-- docs/content/modules/orders/admin/edit-order.mdx | 2 +- .../modules/orders/storefront/handle-order-edits.mdx | 2 +- .../backend/override-price-selection-strategy.md | 2 +- docs/content/modules/products/overview.mdx | 2 +- .../modules/taxes/backend/create-tax-provider.md | 2 +- .../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.md | 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 +- .../troubleshooting/create-medusa-app-errors.md | 2 +- docs/content/troubleshooting/errors-after-update.md | 2 +- docs/content/troubleshooting/signing-in-to-admin.md | 2 +- .../troubleshooting/transaction-error-in-checkout.md | 2 +- docs/content/upgrade-guides/medusa-core/1-10-1.md | 2 +- docs/content/upgrade-guides/medusa-core/1-3-8.md | 2 +- docs/content/upgrade-guides/medusa-core/1-6-1.md | 4 ++-- 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 +- docs/content/usage.md | 4 ++-- 57 files changed, 74 insertions(+), 68 deletions(-) diff --git a/docs/content/admin/quickstart.mdx b/docs/content/admin/quickstart.mdx index 0d7a53def2..639c6a8223 100644 --- a/docs/content/admin/quickstart.mdx +++ b/docs/content/admin/quickstart.mdx @@ -110,8 +110,8 @@ 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 npm2yarn -npm run start +```bash +npx @medusajs/medusa-cli 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. @@ -208,7 +208,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 -medusa user -e some@email.com -p some-password +npx @medusajs/medusa-cli 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/deployments/admin/deploying-on-vercel.md b/docs/content/deployments/admin/deploying-on-vercel.md index 1009456c91..c13e7f41f7 100644 --- a/docs/content/deployments/admin/deploying-on-vercel.md +++ b/docs/content/deployments/admin/deploying-on-vercel.md @@ -128,7 +128,7 @@ This section explains how to deploy the admin using the Vercel website: 1. Open the [Vercel dashboard](https://vercel.com/dashboard) after logging in. 2. Click on the “Add New…” button next to the search bar. 3. Choose Project from the dropdown. -4. In the new page that opens, find the Git repository that holds your medusa backend and click on the Import button. If you haven’t connected your Vercel account to any Git provider, you must do that first. +4. In the new page that opens, find the Git repository that holds your Medusa backend and click on the Import button. If you haven’t connected your Vercel account to any Git provider, you must do that first. 5. In the Configure Project form: 1. Set the Framework Preset to Vite. 2. Open the Build and Output Settings collapsible, and set the Build Command to `yarn build:admin` and the Output Directory to `build`. If you’ve configured the admin to use a different output directory, then change it to that directory. diff --git a/docs/content/deployments/storefront/deploying-gatsby-on-netlify.md b/docs/content/deployments/storefront/deploying-gatsby-on-netlify.md index 87e8a09fd2..7b48939edd 100644 --- a/docs/content/deployments/storefront/deploying-gatsby-on-netlify.md +++ b/docs/content/deployments/storefront/deploying-gatsby-on-netlify.md @@ -152,7 +152,7 @@ If you haven’t added any products to your Medusa backend, the build process mi Alternatively, you can seed the backend with demo data by running this command in the root directory of the backend: ```bash noReport -medusa seed -f data/seed.json +npx @medusajs/medusa-cli seed -f data/seed.json ``` ::: @@ -285,7 +285,7 @@ If you haven’t added any products to your Medusa backend, the build process mi Alternatively, you can seed the backend with demo data by running this command in the root directory of the backend: ```bash noReport -medusa seed -f data/seed.json +npx @medusajs/medusa-cli seed -f data/seed.json ``` ::: diff --git a/docs/content/development/backend/configurations.md b/docs/content/development/backend/configurations.md index 92fe40376c..fb22a0a934 100644 --- a/docs/content/development/backend/configurations.md +++ b/docs/content/development/backend/configurations.md @@ -91,7 +91,7 @@ Where `test` is the name of the database schema that should be used instead of ` Remember to run migrations after you change your database type to `postgres` from another type: ```bash -medusa migrations run +npx @medusajs/medusa-cli migrations run ``` ### Common Configuration diff --git a/docs/content/development/batch-jobs/create.mdx b/docs/content/development/batch-jobs/create.mdx index eb222f7a48..93ee414de1 100644 --- a/docs/content/development/batch-jobs/create.mdx +++ b/docs/content/development/batch-jobs/create.mdx @@ -272,7 +272,7 @@ class PublishStrategy extends AbstractBatchJobStrategy { After you create the batch job and before testing it out, you must run the build command in the directory of your Medusa backend: -```bash +```bash npm2yarn npm run build ``` @@ -283,7 +283,7 @@ npm run build This section covers how to test and use your batch job strategy. Make sure to start your backend first: ```bash -npm run start +npx @medusajs/medusa-cli develop ``` :::info diff --git a/docs/content/development/cache/create.md b/docs/content/development/cache/create.md index b092a8471e..d5ebf0507b 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 -npm run start +npx @medusajs/medusa-cli develop ``` --- diff --git a/docs/content/development/cache/modules/in-memory.md b/docs/content/development/cache/modules/in-memory.md index 9a4a175288..6c578158c2 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 -npm run start +npx @medusajs/medusa-cli 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 f16cfc9be9..8c2aa499cd 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 -npm run start +npx @medusajs/medusa-cli develop ``` If the module was installed successfully, you should see the following message in the logs: diff --git a/docs/content/development/endpoints/example-logged-in-user.md b/docs/content/development/endpoints/example-logged-in-user.md index 17d83570c1..8e31b1e4f9 100644 --- a/docs/content/development/endpoints/example-logged-in-user.md +++ b/docs/content/development/endpoints/example-logged-in-user.md @@ -193,7 +193,7 @@ npm run build Then, run your backend with the following command: ```bash npm2yarn -npm run start +npx @medusajs/medusa-cli 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/entities/extend-repository.md b/docs/content/development/entities/extend-repository.md index 9d30e334a1..a9f937a891 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 -npm run start +npx @medusajs/medusa-cli develop ``` You should see your custom implementation working as expected. diff --git a/docs/content/development/events/create-module.md b/docs/content/development/events/create-module.md index 7e878a58f9..3e43c24675 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 -npm run start +npx @medusajs/medusa-cli develop ``` --- diff --git a/docs/content/development/events/modules/local.md b/docs/content/development/events/modules/local.md index fa900e9df5..6a52536eb1 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 -npm run start +npx @medusajs/medusa-cli 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 956b2ba765..1f1a5f6cd3 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 -npm run start +npx @medusajs/medusa-cli 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 92133e001a..003f18bcd0 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 -medusa migrations run +npx @medusajs/medusa-cli 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 a255f5ab87..88d8735426 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 -npm run start +npx @medusajs/medusa-cli 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 397dabe76e..3e0f2279a8 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 -npm run start +npx @medusajs/medusa-cli 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 63fc024e2d..e914f73e09 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 -npm run start +npx @medusajs/medusa-cli 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 387f210eee..57a47b17ba 100644 --- a/docs/content/development/notification/create-notification-provider.md +++ b/docs/content/development/notification/create-notification-provider.md @@ -297,13 +297,19 @@ Notice that the value of the `identifier` static property defined in the `EmailS Make sure you have an event bus module configured in your Medusa backend. You can learn more on how to do that in the [Configurations guide](../backend/configurations.md). -Then, start by running your Medusa backend: +Then, run the build command in the root directory of your Medusa backend: ```bash npm2yarn -npm run start +npm run build ``` -Then, place an order either using the [REST APIs](/api/store) or using the storefront. +Next, start your Medusa backend: + +```bash npm2yarn +npx @medusajs/medusa-cli develop +``` + +Try now to place an order either using the [REST APIs](/api/store) or using the storefront. :::tip diff --git a/docs/content/development/scheduled-jobs/create.md b/docs/content/development/scheduled-jobs/create.md index 1158e97123..6a86114944 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 -npm run start +npx @medusajs/medusa-cli 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 5f43b9d612..3e8e795319 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 -npm run start +npx @medusajs/medusa-cli 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.md b/docs/content/development/services/extend-service.md index 78833e7492..ccaf7a93d2 100644 --- a/docs/content/development/services/extend-service.md +++ b/docs/content/development/services/extend-service.md @@ -80,7 +80,7 @@ npm run build Then, start the backend: ```bash npm2yarn -npm run start +npx @medusajs/medusa-cli 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 99e64bf4ee..c8ef7336d8 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 -npm run start +npx @medusajs/medusa-cli develop ``` You can test now whether your strategy is working by performing the actions that run your strategy. diff --git a/docs/content/js-client/overview.md b/docs/content/js-client/overview.md index 375053c6fa..12d2dde72e 100644 --- a/docs/content/js-client/overview.md +++ b/docs/content/js-client/overview.md @@ -32,7 +32,7 @@ const medusa = new Medusa() ## How to Use this Reference -You'll find in the sidebar of this reference names of different resources. These resources are properties in the medusa instance you initialize and you can access them directly using the instance. Then, you'll be able to access the methods or nested resources within those resources. +You'll find in the sidebar of this reference names of different resources. These resources are properties in the Medusa instance you initialize and you can access them directly using the instance. Then, you'll be able to access the methods or nested resources within those resources. For example, to create a new customer you can access the [create](/references/js-client/classes/CustomerResource#create) method under the [customers](/references/js-client/classes/CustomerResource) property of your client: diff --git a/docs/content/medusa-react/overview.md b/docs/content/medusa-react/overview.md index b4c4e13973..0128be4529 100644 --- a/docs/content/medusa-react/overview.md +++ b/docs/content/medusa-react/overview.md @@ -88,7 +88,7 @@ You can also pass the following props to Medusa Provider: ### Queries -To fetch data from the Medusa backend (in other words, perform `GET` requests), you can use [Queries](https://tanstack.com/query/v4/docs/react/guides/queries). Query hooks simply wrap around Tanstack Query's `useQuery` hook to fetch data from your medusa backend. +To fetch data from the Medusa backend (in other words, perform `GET` requests), you can use [Queries](https://tanstack.com/query/v4/docs/react/guides/queries). Query hooks simply wrap around Tanstack Query's `useQuery` hook to fetch data from your Medusa backend. For example, to fetch products from your Medusa backend: @@ -133,7 +133,7 @@ You can learn more about using queries in [Tanstack Query’s documentation](htt ### Mutations -To create, update, or delete data on the Medusa backend (in other words, perform `POST`, `PUT`, and `DELETE` requests), you can use [Mutations](https://tanstack.com/query/v4/docs/react/guides/mutations). Mutation hooks wrap around Tanstack Query's `useMutation` to mutate data on your medusa backend. +To create, update, or delete data on the Medusa backend (in other words, perform `POST`, `PUT`, and `DELETE` requests), you can use [Mutations](https://tanstack.com/query/v4/docs/react/guides/mutations). Mutation hooks wrap around Tanstack Query's `useMutation` to mutate data on your Medusa backend. For example, to create a cart: @@ -356,7 +356,7 @@ To facilitate building custom storefronts, `medusa-react` also exposes a `CartP `CartProvider` makes use of some of the hooks already exposed by `medusa-react` to perform cart operations on the Medusa backend. You can use it to create a cart, start the checkout flow, authorize payment sessions, and so on. -It also manages one single global piece of state which represents a cart, exactly like the one created on your medusa backend. +It also manages one single global piece of state which represents a cart, exactly like the one created on your Medusa backend. To use `CartProvider`, you first have to insert it somewhere in your component tree below the `MedusaProvider`. 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 6362e8aa86..daec37f281 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 -npm run start +npx @medusajs/medusa-cli 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 de80d38a34..5b1e86738d 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 -medusa migrations run +npx @medusajs/medusa-cli 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 -medusa migrations run +npx @medusajs/medusa-cli migrations run ``` ### Step 4: Run Migration Script diff --git a/docs/content/modules/orders/admin/edit-order.mdx b/docs/content/modules/orders/admin/edit-order.mdx index dad0e2e27a..5e41d988cf 100644 --- a/docs/content/modules/orders/admin/edit-order.mdx +++ b/docs/content/modules/orders/admin/edit-order.mdx @@ -566,7 +566,7 @@ It returns the Order Edit object. You can access the following properties relate :::tip -💡 This request triggers the event `order-edit.requested`. You can use a subscriber to send an email to the customer with a link to view the order edit on the storefront. You can learn more in the [Events reference](../../../development/events/events-list.md). +This request triggers the event `order-edit.requested`. You can use a subscriber to send an email to the customer with a link to view the order edit on the storefront. You can learn more in the [Events reference](../../../development/events/events-list.md). ::: diff --git a/docs/content/modules/orders/storefront/handle-order-edits.mdx b/docs/content/modules/orders/storefront/handle-order-edits.mdx index a2af816489..9b03e9b3b0 100644 --- a/docs/content/modules/orders/storefront/handle-order-edits.mdx +++ b/docs/content/modules/orders/storefront/handle-order-edits.mdx @@ -191,7 +191,7 @@ If `difference_due` is less than 0, then the amount will be refunded to the cust :::note -💡 This section explains how to authorize the payment using one payment processor and payment session. However, payment collections allow customers to pay in installments or with more than one provider. You can learn more about how to do that using the [batch endpoints of the Payment APIs](/api/store/#tag/Payment/operation/PostPaymentCollectionsSessionsBatchAuthorize) +This section explains how to authorize the payment using one payment processor and payment session. However, payment collections allow customers to pay in installments or with more than one provider. You can learn more about how to do that using the [batch endpoints of the Payment APIs](/api/store/#tag/Payment/operation/PostPaymentCollectionsSessionsBatchAuthorize) ::: 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 380b1e28ef..8fb2011b4a 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 -npm run start +npx @medusajs/medusa-cli 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/products/overview.mdx b/docs/content/modules/products/overview.mdx index 2b98e0c701..62ff78ca5a 100644 --- a/docs/content/modules/products/overview.mdx +++ b/docs/content/modules/products/overview.mdx @@ -11,7 +11,7 @@ Products are items or services that businesses sell to their customers. This ove :::note -💡 Not a developer? Check out the [Products user guide](../../user-guide/products/manage.mdx). +Not a developer? Check out the [Products user guide](../../user-guide/products/manage.mdx). ::: diff --git a/docs/content/modules/taxes/backend/create-tax-provider.md b/docs/content/modules/taxes/backend/create-tax-provider.md index 5a87cb3578..8bd21c787b 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 -npm run start +npx @medusajs/medusa-cli 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 ca44e4313b..337a0c9983 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 -npm run start +npx @medusajs/medusa-cli 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 cf0742085a..e99096a4d9 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 -npm run start +npx @medusajs/medusa-cli 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 storefront](../../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 c38641bb64..bd837c82f7 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 -npm run start +npx @medusajs/medusa-cli 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 c249e1538a..71774bfb6d 100644 --- a/docs/content/plugins/cms/contentful/index.md +++ b/docs/content/plugins/cms/contentful/index.md @@ -167,7 +167,7 @@ npm run seed To start the backend run the following command: ```bash -npm run start +npx @medusajs/medusa-cli 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 80d731df63..0f048bb4a1 100644 --- a/docs/content/plugins/cms/strapi.md +++ b/docs/content/plugins/cms/strapi.md @@ -172,7 +172,7 @@ npm run develop Then, in the directory of your Medusa backend, run the following command to start the Medusa backend: ```bash npm2yarn -npm run start +npx @medusajs/medusa-cli 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.md b/docs/content/plugins/file-service/s3.md index 4b7d50d283..7664e7a007 100644 --- a/docs/content/plugins/file-service/s3.md +++ b/docs/content/plugins/file-service/s3.md @@ -177,7 +177,7 @@ If you have multiple storage plugins configured, the last plugin declared in the Run your Medusa backend with the following command: ```bash npm2yarn -npm run start +npx @medusajs/medusa-cli 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 923265c149..6b6ab41f67 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 -npm run start +npx @medusajs/medusa-cli 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 96cbead9e2..5e5adf60f9 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 -npm run start +npx @medusajs/medusa-cli 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 ec4b64ccb2..a5f0ee6fa8 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 -npm run start +npx @medusajs/medusa-cli 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 94789ebe58..6bc6af045a 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 -npm run start +npx @medusajs/medusa-cli 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/troubleshooting/create-medusa-app-errors.md b/docs/content/troubleshooting/create-medusa-app-errors.md index 8182c9df8e..92aec0e1bc 100644 --- a/docs/content/troubleshooting/create-medusa-app-errors.md +++ b/docs/content/troubleshooting/create-medusa-app-errors.md @@ -8,7 +8,7 @@ To resolve this issue, make sure you change into the `backend` directory of the ```bash npm2yarn cd backend -npm run start +npx @medusajs/medusa-cli develop ``` ## Other Errors diff --git a/docs/content/troubleshooting/errors-after-update.md b/docs/content/troubleshooting/errors-after-update.md index aadfcd5139..ee2ef31578 100644 --- a/docs/content/troubleshooting/errors-after-update.md +++ b/docs/content/troubleshooting/errors-after-update.md @@ -5,7 +5,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 -medusa migrations run +npx @medusajs/medusa-cli 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 c1e6ac2af3..acbc7da796 100644 --- a/docs/content/troubleshooting/signing-in-to-admin.md +++ b/docs/content/troubleshooting/signing-in-to-admin.md @@ -10,7 +10,7 @@ password: supersecret Alternatively, you can create your own users using the Medusa CLI tool: ```bash -medusa user -e some@email.com -p somepassword +npx @medusajs/medusa-cli user -e some@email.com -p somepassword ``` --- diff --git a/docs/content/troubleshooting/transaction-error-in-checkout.md b/docs/content/troubleshooting/transaction-error-in-checkout.md index 07120523fa..6f362b20a7 100644 --- a/docs/content/troubleshooting/transaction-error-in-checkout.md +++ b/docs/content/troubleshooting/transaction-error-in-checkout.md @@ -41,7 +41,7 @@ database_database: "./medusa-db.sql", Then, migrate the database schema to the new PostgreSQL database: ```bash -medusa migrations run +npx @medusajs/medusa-cli migrations run ``` :::tip 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 b6b93918e8..62324d8cd7 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 -medusa migrations run +npx @medusajs/medusa-cli migrations run ``` diff --git a/docs/content/upgrade-guides/medusa-core/1-3-8.md b/docs/content/upgrade-guides/medusa-core/1-3-8.md index 5af239cdff..0fd5d46585 100644 --- a/docs/content/upgrade-guides/medusa-core/1-3-8.md +++ b/docs/content/upgrade-guides/medusa-core/1-3-8.md @@ -4,7 +4,7 @@ description: 'Actions Required for v.1.3.8' # v1.3.8 -Updating your medusa backend to version `1.3.8` may cause issues when using NPM. Please refer to this guide for more details on how to resolve it. +Updating your Medusa backend to version `1.3.8` may cause issues when using NPM. Please refer to this guide for more details on how to resolve it. ## Update Using Yarn 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 3d5c46211e..9750ed331a 100644 --- a/docs/content/upgrade-guides/medusa-core/1-6-1.md +++ b/docs/content/upgrade-guides/medusa-core/1-6-1.md @@ -4,7 +4,7 @@ description: 'Actions Required for v.1.6.1' # v1.6.1 -Updating your medusa backend to version `1.6.1` requires running migrations on your backend. +Updating your Medusa backend to version `1.6.1` requires running migrations on your backend. ## Overview @@ -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 -medusa migrations run +npx @medusajs/medusa-cli 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 3745911417..5182a2a081 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 -medusa migrations run +npx @medusajs/medusa-cli 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 4d5f59041c..fede33848e 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 -medusa migrations run +npx @medusajs/medusa-cli 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 3a9ffead96..08403b2479 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 -medusa migrations run +npx @medusajs/medusa-cli 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 2f705acc91..699aafd163 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 -medusa migrations run +npx @medusajs/medusa-cli 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 aca498f355..fff3564600 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 -medusa migrations run +npx @medusajs/medusa-cli 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 a2347d4268..c09ff8e2b3 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 -medusa migrations run +npx @medusajs/medusa-cli 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 18ea236688..5a1adfd9e6 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 -medusa migrations run +npx @medusajs/medusa-cli 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 02a7f12970..652c33f66e 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 -medusa migrations run +npx @medusajs/medusa-cli migrations run ``` diff --git a/docs/content/usage.md b/docs/content/usage.md index 37bd11d558..53ed51a489 100644 --- a/docs/content/usage.md +++ b/docs/content/usage.md @@ -44,7 +44,7 @@ The following data is being collected on your backend: :::info -💡 Data is only collected when the backend is run with the command `medusa start`. +Data is only collected when the backend is run with the command `medusa start`. ::: @@ -59,7 +59,7 @@ MEDUSA_DISABLE_TELEMETRY=true Or, you can run the following command in the root of your Medusa backend project to disable it: ```bash -medusa telemetry --disable +npx @medusajs/medusa-cli telemetry --disable ``` ---