diff --git a/.changeset/shaggy-needles-raise.md b/.changeset/shaggy-needles-raise.md new file mode 100644 index 0000000000..85fb346a85 --- /dev/null +++ b/.changeset/shaggy-needles-raise.md @@ -0,0 +1,5 @@ +--- +"medusa-payment-manual": patch +--- + +fix(medusa-payment-manual): Add missing update method diff --git a/.github/workflows/docs-new-announcement.yml b/.github/workflows/docs-new-announcement.yml new file mode 100644 index 0000000000..5e980cee24 --- /dev/null +++ b/.github/workflows/docs-new-announcement.yml @@ -0,0 +1,48 @@ +name: Generate Docs Release Announcement Bar +on: + release: + types: [published] + +jobs: + add-announcement: + runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ secrets.REFERENCE_PAT }} + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} + + - name: Checkout + uses: actions/checkout@v2.3.5 + with: + fetch-depth: 0 + + - name: Setup Node.js environment + uses: actions/setup-node@v2.4.1 + with: + node-version: "14" + cache: "yarn" + + - name: Install dependencies + uses: ./.github/actions/cache-deps + with: + extension: docs-release + + - name: Build Packages + run: yarn build + + - name: Generate Announcement Bar + run: yarn generate:announcement + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v4 + with: + commit-message: 'chore(docs): Generated Docs Announcement Bar (automated)' + base: 'master' + title: 'chore(docs): Generated Docs Announcement Bar (automated)' + labels: 'type: chore' + add-paths: www/docs/** + branch: 'chore/generate-announcement' + branch-suffix: 'timestamp' \ No newline at end of file diff --git a/.github/workflows/docs-remove-announcement.yml b/.github/workflows/docs-remove-announcement.yml new file mode 100644 index 0000000000..23eb7ce48a --- /dev/null +++ b/.github/workflows/docs-remove-announcement.yml @@ -0,0 +1,46 @@ +# Checks if the announcement bar info was last edited more than 6 days ago, and if so removes it +name: Remove Docs Release Announcement Bar +on: + schedule: + - cron: '0 0 * * *' + +jobs: + remove-announcement: + runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ secrets.REFERENCE_PAT }} + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} + + - name: Checkout + uses: actions/checkout@v2.3.5 + with: + fetch-depth: 0 + + - name: Setup Node.js environment + uses: actions/setup-node@v2.4.1 + with: + node-version: "14" + cache: "yarn" + + - name: Install dependencies + uses: ./.github/actions/cache-deps + with: + extension: docs-remove-announcement + + - name: Remove Announcement Bar + run: yarn generate:announcement --expire + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v4 + with: + commit-message: 'chore(docs): Removed Docs Announcement Bar (automated)' + base: 'master' + title: 'chore(docs): Removed Docs Announcement Bar (automated)' + labels: 'type: chore' + add-paths: www/docs/** + branch: 'chore/remove-announcement' + branch-suffix: 'timestamp' \ No newline at end of file diff --git a/.github/workflows/docs-test.yml b/.github/workflows/docs-test.yml index 0472ae933a..11a1bc4b4a 100644 --- a/.github/workflows/docs-test.yml +++ b/.github/workflows/docs-test.yml @@ -1,4 +1,4 @@ -name: Docusaurus Documentation Test +name: Documentation Tests on: pull_request: paths: @@ -34,3 +34,29 @@ jobs: cd www/docs yarn install yarn build + lint: + runs-on: ubuntu-latest + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} + + - name: Checkout + uses: actions/checkout@v2.3.5 + with: + fetch-depth: 0 + + - name: Get Directories to Scan + working-directory: docs + run: ./get-files.sh + id: directories + + - name: Vale Linter + uses: errata-ai/vale-action@reviewdog + with: + files: ${{ steps.directories.outputs.LIST }} + fail_on_error: true + vale_flags: '--minAlertLevel=error' + env: + GITHUB_TOKEN: ${{ github.token }} \ No newline at end of file diff --git a/.vale.ini b/.vale.ini new file mode 100644 index 0000000000..db9d16fe76 --- /dev/null +++ b/.vale.ini @@ -0,0 +1,17 @@ +StylesPath = docs/styles + +MinAlertLevel = suggestion +Vocab = Base + +Packages = write-good + +[*.{md,mdx}] +BasedOnStyles = Vale, write-good, docs +Vale.Spelling=warning +write-good.E-Prime=No +write-good.So=No +write-good.ThereIs=No +Vale.Terms=No + +[formats] +mdx = md \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 17d405ccba..8494cca62e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -56,6 +56,8 @@ All PRs should include tests for the changes that are included. We have two type - **Unit tests** found under `packages/*/src/services/__tests__` and `packages/*/src/api/routes/*/__tests__` - **Integration tests** found in `integration-tests/*/__tests__` +Check out our [local development documentation](https://docs.medusajs.com/usage/local-development) to learn how to test your changes both in the Medusa repository and in a local server. + ### Documentation - We generally encourage to document your changes through comments in your code. @@ -64,4 +66,4 @@ All PRs should include tests for the changes that are included. We have two type ### Release -The Medusa team will regularly create releases from the develop branch. +The Medusa team will regularly create releases from the develop branch. \ No newline at end of file diff --git a/README.md b/README.md index c1c85552ce..856bd19d70 100644 --- a/README.md +++ b/README.md @@ -37,19 +37,7 @@ An open-source composable commerce engine built for developers. ## Getting Started -### Deploy in 5 minutes - -You can deploy your Medusa server in 5 minutes just by clicking the button below. - -

- - Deploy - -

- -### Install Locally - -You can install Medusa locally or manually on your server by either following our [Quickstart guide](https://docs.medusajs.com/quickstart/quick-start) or the following steps: +You can install Medusa by either following our [Quickstart guide](https://docs.medusajs.com/quickstart/quick-start) or the following steps: 1. **Install Medusa CLI** @@ -66,6 +54,7 @@ You can install Medusa locally or manually on your server by either following ou 3. **Start your Medusa engine** ```bash + cd my-medusa-store medusa develop ``` @@ -144,4 +133,4 @@ Follow our [upgrade guides](https://docs.medusajs.com/advanced/backend/upgrade- ## License -Licensed under the [MIT License](https://github.com/medusajs/medusa/blob/master/LICENSE) \ No newline at end of file +Licensed under the [MIT License](https://github.com/medusajs/medusa/blob/master/LICENSE) diff --git a/docs/content/add-plugins/algolia.md b/docs/content/add-plugins/algolia.md index 3f8925341e..63df4d6d6c 100644 --- a/docs/content/add-plugins/algolia.md +++ b/docs/content/add-plugins/algolia.md @@ -14,7 +14,7 @@ Through Medusa's flexible plugin system, it is possible to add a search engine t ### Medusa Components -It is required to have a Medusa server installed before starting with this documentation. If not, please follow along with our [quickstart guide](../quickstart/quick-start.md) to get started in minutes. +It is required to have a Medusa server installed before starting with this documentation. If not, please follow along with the [quickstart guide](../quickstart/quick-start.md) to get started in minutes. Furthermore, it’s highly recommended to ensure your Medusa server is configured to work with Redis. As Medusa uses Redis for the event queue internally, configuring Redis ensures that the search indices in Algolia are updated whenever products on the Medusa server are updated. You can follow [this documentation to install Redis](../tutorial/0-set-up-your-development-environment.mdx#redis) and then [configure it on your Medusa server](../usage/configurations.md#redis). diff --git a/docs/content/add-plugins/contentful/customize-contentful.md b/docs/content/add-plugins/contentful/customize-contentful.md index 5488c1bf92..9588df16f6 100644 --- a/docs/content/add-plugins/contentful/customize-contentful.md +++ b/docs/content/add-plugins/contentful/customize-contentful.md @@ -227,13 +227,13 @@ export const query = graphql` To test this out, run your Medusa server by running this command in its directory: ```bash -npm start +npm run start ``` Then run the Gatsby storefront by running this command in its directory: ```bash -npm start +npm run start ``` This runs the Gatsby storefront on `localhost:8000`. Go to the storefront in your browser and open the About page. You should see the Rich Text content you added. diff --git a/docs/content/add-plugins/contentful/index.md b/docs/content/add-plugins/contentful/index.md index 9d71ecd6fb..89c13bc9a1 100644 --- a/docs/content/add-plugins/contentful/index.md +++ b/docs/content/add-plugins/contentful/index.md @@ -1,6 +1,6 @@ # Contentful -In this document, you’ll learn how to integrate a Medusa server with Contentful to add rich CMS functionalities +In this document, you’ll learn how to integrate a Medusa server with Contentful to add rich Content Management System (CMS) functionalities ## Overview @@ -36,7 +36,7 @@ This installs a new Medusa server in the directory `medusa-contentful`. ### Add Contentful Environment Variables -Change to the `medusa-contentful` directory. In `.env` you’ll find 3 variables: +Change to the `medusa-contentful` directory. In `.env` you’ll find three variables: ```bash CONTENTFUL_SPACE_ID= @@ -172,7 +172,7 @@ npm run seed To start the server run the following command: ```bash -npm start +npm run start ``` If you seeded the database with demo data, you should see that events related to the products are triggered. @@ -257,7 +257,7 @@ You should find the field "Content Delivery API - access token”. Copy its valu Make sure the Medusa server is still running. Then, start the storefront: ```bash -npm start +npm run start ``` This starts the storefront at `localhost:8000`. Open it in your browser and you should see on the homepage the Featured Product section with the products you chose on Contentful. diff --git a/docs/content/add-plugins/mailchimp.md b/docs/content/add-plugins/mailchimp.md index abaae99f58..fb5bc2491b 100644 --- a/docs/content/add-plugins/mailchimp.md +++ b/docs/content/add-plugins/mailchimp.md @@ -10,19 +10,19 @@ By integrating Mailchimp with Medusa, customers will be able to subscribe from M :::note -This plugin is only used to allow your customers to subscribe but does not actually do any email sending. If you want to send emails to customers based on specific events, for example, when an order is placed, you should check out our [SendGrid plugin](./sendgrid.mdx) instead. +This plugin is only used to allow your customers to subscribe but does not actually do any email sending. If you want to send emails to customers based on specific events, for example, when an order is placed, you should check out the [SendGrid plugin](./sendgrid.mdx) instead. ::: ## Prerequisites -Before going further with this guide make sure you have a Medusa server set up. You can follow our [Quickstart guide](https://docs.medusajs.com/quickstart/quick-start). +Before going further with this guide make sure you have a Medusa server set up. You can follow the [Quickstart guide](https://docs.medusajs.com/quickstart/quick-start). You also need a Mailchimp account, so please [create one](https://mailchimp.com/signup) before you start. ## Obtain Mailchimp Keys -To integrate the plugin into Medusa you need 2 keys: The API Key and the Newsletter list or Audience ID. The API Key acts as a credential for your account, whereas the Newsletter list ID determines which audience should the subscribed customers be added to. +To integrate the plugin into Medusa you need two keys: The API Key and the Newsletter list or Audience ID. The API Key acts as a credential for your account, whereas the Newsletter list ID determines which audience should the subscribed customers be added to. You can follow [this guide](https://mailchimp.com/help/about-api-keys/#Find_or_generate_your_API_key) from Mailchimp’s documentation to obtain an API Key. @@ -179,5 +179,5 @@ If you try entering an email and clicking Subscribe, the email will be subscribe ## What’s Next 🚀 -- Check out SendGrid plugin for more Email functionalities. -- [Learn more about plugins.](../advanced/backend/plugins/overview.md) \ No newline at end of file +- Check out [SendGrid plugin](../add-plugins/sendgrid.mdx) for more Email functionalities. +- [Learn more about plugins.](../advanced/backend/plugins/overview.md) diff --git a/docs/content/add-plugins/meilisearch.md b/docs/content/add-plugins/meilisearch.md index 65f572d4c1..633d3bf61f 100644 --- a/docs/content/add-plugins/meilisearch.md +++ b/docs/content/add-plugins/meilisearch.md @@ -14,7 +14,7 @@ Through Medusa's flexible plugin system, it is possible to add a search engine t ### Medusa Components -It is required to have a Medusa server installed before starting with this documentation. If not, please follow along with our [quickstart guide](../quickstart/quick-start.md) to get started in minutes. +It is required to have a Medusa server installed before starting with this documentation. If not, please follow along with the [quickstart guide](../quickstart/quick-start.md) to get started in minutes. Furthermore, it’s highly recommended to ensure your Medusa server is configured to work with Redis. As Medusa uses Redis for the event queue internally, configuring Redis ensures that the search indices in MeiliSearch are updated whenever products on the Medusa server are updated. You can follow [this documentation to install Redis](../tutorial/0-set-up-your-development-environment.mdx#redis) and then [configure it on your Medusa server](../usage/configurations.md#redis). diff --git a/docs/content/add-plugins/minio.md b/docs/content/add-plugins/minio.md index 815e412f07..983ff59450 100644 --- a/docs/content/add-plugins/minio.md +++ b/docs/content/add-plugins/minio.md @@ -117,27 +117,29 @@ Run your Medusa server alongside the [Medusa Admin](../admin/quickstart.md) to t ![Image Uploaded on Admin](https://i.imgur.com/alabX2i.png) -## Additional Configuration for Exports +## Private Buckets -Medusa v1.3.3 introduced the Export API. For example, you can now export your products from the Medusa Admin on the Products page. +### Handle Exports -![Export button in Products page in Medusa Admin](https://i.imgur.com/uyK4id8.png) +Medusa provides export functionalities including exporting products and orders. For exports to work, you must [set up a private bucket](#create-private-bucket). -:::note +### Handle Imports -Exports require using Redis to handle the event queue, and using PostgreSQL for the database. If you don’t use Redis or PostgreSQL, you can follow [this documentation to install](../tutorial/0-set-up-your-development-environment.mdx#postgresql) and then [configure them on your Medusa server](../usage/configurations.md#postgresql-configurations). +Medusa provides import functionalities including importing products. For imports to work, you must [set the private bucket](#add-private-bucket-environment-variable) to be the same as the public bucket. -::: +### Create Private Bucket -When using MinIO, you must create a private bucket that will store these product exports. To do that, follow along the [steps mentioned earlier to create a bucket](#create-a-minio-bucket), but keep Access Policy set to private. +To create a private bucket, follow along the [steps mentioned earlier](#create-a-minio-bucket), but keep Access Policy set to private. -Then, add the following environment variable on your Medusa server: +### Add Private Bucket Environment Variable + +Add the following environment variable on your Medusa server: ```bash MINIO_PRIVATE_BUCKET=exports ``` -Finally, add a new option to the plugin’s options in `medusa-config.js`: +Then, add a new option to the plugin’s options in `medusa-config.js`: ```jsx { @@ -149,16 +151,6 @@ Finally, add a new option to the plugin’s options in `medusa-config.js`: }, ``` -If you start your Medusa server now and click on Export Products on the Medusa admin, the export will run in the background. When ready, it should be available for download. - -![Export is available for download on the Medusa Admin](https://i.imgur.com/Xc61Wg1.png) - -:::tip - -If you face any errors, make sure you have the latest version of the plugin installed. - -::: - ### Use Different Secret and Access Keys If you only add the `private_bucket` option, the same secret and access keys that you used for the public bucket will be used to access the private bucket. diff --git a/docs/content/add-plugins/paypal.md b/docs/content/add-plugins/paypal.md index 45a56da32d..6f6fa32056 100644 --- a/docs/content/add-plugins/paypal.md +++ b/docs/content/add-plugins/paypal.md @@ -18,9 +18,9 @@ In addition, you need to configure a webhook listener on your PayPal Developer D Webhooks are used in scenarios where the customer might leave the page during the authorization and before the checkout flow is fully complete. It will then create the order or swap after the payment is authorized if they weren’t created -Additionally, you need a Medusa server installed and set up. If not, you can follow our [quickstart guide](https://docs.medusajs.com/quickstart/quick-start) to get started. +Additionally, you need a Medusa server installed and set up. If not, you can follow the [quickstart guide](https://docs.medusajs.com/quickstart/quick-start) to get started. -You also need [Medusa Admin](../admin/quickstart.md) installed to enable PayPal as a payment provider. You can alternatively use our [REST APIs](https://docs.medusajs.com/api/admin). +You also need [Medusa Admin](../admin/quickstart.md) installed to enable PayPal as a payment provider. You can alternatively use the [REST APIs](https://docs.medusajs.com/api/admin). ## Medusa Server @@ -80,17 +80,7 @@ If you don’t have a Medusa admin installed, make sure to follow along with [th ### Add PayPal to Regions -Run your Medusa server and Medusa admin, then open the Medusa admin and login. - -Choose Settings from the Sidebar. Then, choose Regions. - -![Region Settings](https://i.imgur.com/wRkmbLY.png) - -Then, choose the regions you want to add PayPal as a payment provider. In the right-side settings, scroll down to “Payment Providers” and choose “paypal”. - -![Choose PayPal](https://i.imgur.com/AJ2Yez8.png) - -Once you’re done, click Save. PayPal is now a payment provider in your store in the regions you added it to. +You can refer to [this documentation in the user guide](../user-guide/regions/providers.mdx#manage-payment-providers) to learn how to add a payment provider like PayPal to a region. ## Storefront Setup diff --git a/docs/content/add-plugins/s3.md b/docs/content/add-plugins/s3.md index 35ff63d287..c7f105eee5 100644 --- a/docs/content/add-plugins/s3.md +++ b/docs/content/add-plugins/s3.md @@ -32,7 +32,7 @@ The Create Bucket form will open. In the General Configuration section enter a n ![Enter bucket name and choose region in the General Configuration section](https://i.imgur.com/wlxUU8I.png) -Next, in the Object Ownership section, choose ACLs enabled. Then, 2 radio buttons will show below it. Choose Bucket owner preferred. +Next, in the Object Ownership section, choose ACLs enabled. Then, two radio buttons will show below it. Choose Bucket owner preferred. ![In the Object Ownership section choose ACLs enabled, then choose Bucket owner preferred for the Object ownership field](https://i.imgur.com/ChUXQPt.png) diff --git a/docs/content/add-plugins/segment.md b/docs/content/add-plugins/segment.md index 91c5b69080..2fe9b25c25 100644 --- a/docs/content/add-plugins/segment.md +++ b/docs/content/add-plugins/segment.md @@ -119,7 +119,7 @@ const plugins = [ Run your server with the following command: ```bash npm2yarn -npm start +npm run start ``` 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](../starters/nextjs-medusa-starter.md) or [Gatsby](../starters/gatsby-medusa-starter.md) storefronts. diff --git a/docs/content/add-plugins/sendgrid.mdx b/docs/content/add-plugins/sendgrid.mdx index 4fcc04f60c..a1b06d78f1 100644 --- a/docs/content/add-plugins/sendgrid.mdx +++ b/docs/content/add-plugins/sendgrid.mdx @@ -22,7 +22,7 @@ By integrating SendGrid with Medusa, you’ll be sending email notifications to ## Prerequisites -Before going further with this guide make sure you have a Medusa server set up. You can follow our [Quickstart guide](../quickstart/quick-start.md). +Before going further with this guide make sure you have a Medusa server set up. You can follow the [Quickstart guide](../quickstart/quick-start.md). You also must have [Redis configured on your Medusa server](/tutorial/set-up-your-development-environment#redis). Sending emails is done through Subscribers, which uses Redis as the event queue. If you don’t set up Redis, the plugin will not send emails. @@ -42,7 +42,7 @@ If you choose to give the API Key restricted access, make sure to at least give ::: -Once you create the API key, the key will be shown for one time only. So, make sure to copy and save it somewhere for later usage. +Once you create the API key, the key will be shown for one time only. Make sure to copy and save it somewhere for later usage. ### Email Templates @@ -3953,7 +3953,7 @@ To test it out, perform an action that would trigger one of the emails being sen :::tip -If you don’t have a storefront installed, check out our [Gatsby](../starters/gatsby-medusa-starter.md) or [Next.js](../starters/nextjs-medusa-starter.md) starters to create a storefront in minutes. +If you don’t have a storefront installed, check out the [Gatsby](../starters/gatsby-medusa-starter.md) or [Next.js](../starters/nextjs-medusa-starter.md) starters to create a storefront in minutes. ::: diff --git a/docs/content/add-plugins/strapi.md b/docs/content/add-plugins/strapi.md index 524a29d347..0f9b290a2a 100644 --- a/docs/content/add-plugins/strapi.md +++ b/docs/content/add-plugins/strapi.md @@ -1,6 +1,6 @@ # Strapi -In this document, you’ll learn how to integrate Strapi with Medusa to add rich CMS functionalities. +In this document, you’ll learn how to integrate Strapi with Medusa to add rich Content Management System (CMS) functionalities. :::info @@ -170,7 +170,7 @@ Try updating any products on Strapi by going to Content Manager → Products and ### Update Products on Medusa -If you try to update products on Medusa either using the [REST APIs](https://docs.medusajs.com/api/admin/#tag/Product/operation/PostProductsProduct) or using [the Medusa Admin](../user-guide/products/manage.md), you’ll see that the product is also updated on Strapi. +If you try to update products on Medusa either using the [REST APIs](https://docs.medusajs.com/api/admin/#tag/Product/operation/PostProductsProduct) or using [the Medusa Admin](../user-guide/products/manage.mdx), you’ll see that the product is also updated on Strapi. ## What’s Next 🚀 diff --git a/docs/content/add-plugins/stripe.md b/docs/content/add-plugins/stripe.md index 50054ebbcf..53d6f20f2f 100644 --- a/docs/content/add-plugins/stripe.md +++ b/docs/content/add-plugins/stripe.md @@ -4,7 +4,7 @@ This document guides you through setting up Stripe payments in your Medusa serve ## Video Guide -You can also follow our video guide to learn how the setup works: +You can also follow this video guide to learn how the setup works: