Commit Graph

2145 Commits

Author SHA1 Message Date
Shahed Nasser
948a9f1188 docs: fixes to the meilisearch docs (#1979) 2022-08-03 14:27:23 +03:00
Shahed Nasser
736db771e6 docs: improved spaces documentation (#1978) 2022-08-03 12:17:56 +03:00
Shahed Nasser
acd73a7e6a docs: fixes to the digitalocean documentation (#1975) 2022-08-03 11:00:19 +03:00
Shahed Nasser
7aaf424b99 docs: show last updated time (#1972) 2022-08-02 17:47:51 +03:00
Shahed Nasser
d7328e6b73 docs: improved meilisearch docs (#1969) 2022-08-02 17:44:39 +03:00
Shahed Nasser
bb136530c1 docs: fix search in reference (#1971) 2022-08-02 17:30:33 +03:00
Shahed Nasser
36e2e7a4df chore: fix for deployment (#1970)
* fix for deployment

* fixed gitignore files to match that of the root

* add to gitignore in root
2022-08-02 17:16:18 +03:00
Shahed Nasser
5065b7bc5e docs: improved s3 documentation (#1965) 2022-08-02 11:34:05 +03:00
Richard Ward
2b574185ca docs: update create plugin docs (#1953)
* docs: update create plugin docs

Closes #1945 

This updates the documentation to add some troubleshooting to the [Create a Plugin page](https://docs.medusajs.com/advanced/backend/plugins/create)

* Add new section to plugin documentation and updated existing content

* Update docs/content/advanced/backend/plugins/create.md

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>

* Update docs/content/advanced/backend/plugins/create.md

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>

* Update docs/content/advanced/backend/plugins/create.md

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>

* Update docs/content/advanced/backend/plugins/create.md

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2022-08-01 18:07:42 +03:00
Shahed Nasser
f5a42c43fd docs: improved segment documentation (#1956) 2022-08-01 17:50:30 +03:00
Richard Ward
db842b7da9 docs: add troubleshooting to medusa-file-s3 plugin (#1952)
* docs: add troubleshooting to medusa-file-s3 plugin

Closes #1943 

This updates the documentation to add some troubleshooting to the medusa-file-s3 plugin documentation.

The fix has been show to work with 2 installations so far - context is here: https://discord.com/channels/876835651130097704/877195433649258536/1003273089284571156

* Update docs/content/add-plugins/s3.md

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>

* Update docs/content/add-plugins/s3.md

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2022-08-01 15:07:40 +03:00
Richard Ward
ee58c588f1 docs: last storage plugin is default - spaces (#1951)
* docs: last storage plugin is default

Add caution that only the last configured storage plugin will be used

* Update docs/content/add-plugins/spaces.md

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2022-08-01 14:57:52 +03:00
Richard Ward
33a3aa5e60 docs: last storage plugin is default - s3 (#1950)
* docs: storage plugin default

add caution that only last storage plugin will be used

* Update docs/content/add-plugins/s3.md

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2022-08-01 14:56:49 +03:00
Richard Ward
83f5ef1554 docs: last storage plugin is default - minio (#1949)
* docs: caution to say only last configured storage plugin will be used

Added a caution that only the lat configured storage provider will be used

* Update docs/content/add-plugins/minio.md

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2022-08-01 14:54:29 +03:00
Debashis Biswal
058e66a4d2 docs: fix typos for overview on the homepage.md 📕✏️ (#1954)
* Fix typos for overview in the homepage documentation file

* Rollback partial changes for overview on homepage.md as per PR(#1954) comment
2022-08-01 14:48:04 +03:00
Omar Moustafa
f26d0fcd53 docs: removed docs link from the footer (#1955)
Closes #1906
2022-08-01 14:47:33 +03:00
Olanrewaju Olatunde
aeb5c68d97 docs: Added a note to create PostgreSQL database (#1916)
* Added a note to create PostgreSQL database

* fixed grammar

* closed admonition

* fixed admonition
2022-08-01 12:21:57 +03:00
Ankit Singh
2810423258 docs: added deploy to netlify button in next.js storefront (#1913) 2022-07-26 17:37:43 +03:00
Ankit Singh
9216ad0811 docs: added missing link in "What's Next" in Notification Architecture Overview (#1911) 2022-07-26 16:39:40 +03:00
Omar Moustafa
f1256f7e8f docs: Fix Install Command in Quickstart Guide (#1905) 2022-07-26 16:39:09 +03:00
Shahed Nasser
23d5809255 docs: added note about build (#1892) 2022-07-22 13:14:02 +03:00
Shahed Nasser
668a269eb7 docs: improved contentful documentation (#1891) 2022-07-22 13:03:25 +03:00
Shahed Nasser
b9995cf2a7 docs: added missing link (#1890) 2022-07-21 16:21:41 +03:00
Shahed Nasser
b2602fa9ed docs: improved digitalocean docs (#1889) 2022-07-21 15:22:29 +03:00
Shahed Nasser
ef84b104e6 docs: update heroku's documentation (#1881) 2022-07-20 12:24:59 +03:00
Shahed Nasser
45dcf420c6 docs: update Next.js documentation based on the new storefront (#1880)
* update next.js storefront docs

* made changes to Next.js sections
2022-07-20 12:08:08 +03:00
Shahed Nasser
f623a85c5d docs: improved qovery documentation (#1875)
* improved qovery guide

* added cli reference link
2022-07-19 18:14:55 +03:00
Shahed Nasser
1029eca944 docs: added a dropdown for references (#1868) 2022-07-18 17:34:12 +03:00
Shahed Nasser
8c727f91f4 docs: added deploy to netlify button for admin (#1865)
* added deploy to netlify button

* chore: fix docs test error (#1866)

* added deploy to netlify button
2022-07-18 15:48:32 +03:00
Shahed Nasser
6ed97e2ae0 chore: fix docs test error (#1866) 2022-07-18 15:30:13 +03:00
Sergio Leon
33bb67bfb9 docs: fix typo in QuickStart next actions (#1861)
check our the… -> check out the…
2022-07-16 23:48:01 +02:00
Shahed Nasser
e134f6d237 chore: fixed commit branch on generate reference action (#1857)
* fixed commit branch

* fixes after yarn upgrade
2022-07-15 18:08:07 +03:00
chemicalkosek
32b066d923 Update to correct placement of webhook secret. (#1856)
Currently the docs say to copy the webhook secret from top right corner which starts with `we_`.
This is not the webhook secret. This is webhook id.
2022-07-15 13:36:17 +02:00
Sebastian Rindom
e539bdc620 chore: Fix CI pipeline (#1839) 2022-07-12 20:14:34 +02:00
olivermrbl
cf167d00b1 chore(release): Publish 2022-07-12 09:38:54 +02:00
olivermrbl
e324f223d7 chore: Add .env to .gitignore 2022-07-12 09:36:04 +02:00
olivermrbl
fb0346f1fa fix: Merge conflicts 2022-07-12 09:29:41 +02:00
Adrien de Peretti
b402b9f159 feat(medusa): Create default sales channel associated to the store (#1830)
**What**
Add support for default sales channel

**How**
- Implement a new method in the salesChannelService `createDefault`
- call the new method above in the default loader

**Test**
- Unit tests of the sales channel service method createDefaulta
- Init default loader unit tests

Fixes CORE-316
2022-07-11 21:05:28 +00:00
Philip Korsholm
19f35ba6aa Feat(medusa, medusa-js, medusa-react): Include sales channels in related queries as an optional expand parameter (#1816)
**What**
- Add `transformQuery` to get endpoints for product, order and cart
  - ensure that the default relations (when getting a singular entity) includes sales channels when enabled
- Add `EmptyQueryParams` class in common types to prevent query parameters while using `transformQuery`
- update product-, order- and cartFactory to include sales channels if provided
- remove `packages/medusa/src/controllers/products/admin-list-products.ts`

**Testing** 
- expands sales channel for single order
- expands sales channels for orders with expand parameter 
- returns single product with sales channel 
- expands sales channels for products with expand parameter
- returns cart with sales channel for single cart

Fixes CORE-293

Co-authored-by: Sebastian Rindom <7554214+srindom@users.noreply.github.com>
Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
2022-07-11 16:45:01 +00:00
Kasper Fabricius Kristensen
fb4cfc3c3c fix(medusa-react): Use correct type for hook useAdminCreateDraftOrder (#1832) 2022-07-11 16:14:10 +02:00
Oliver Windall Juhl
fb82d3dd22 fix(medusa): Add migration ensuring correct state of BatchJob model (#1825) 2022-07-11 15:50:01 +02:00
Sebastian Rindom
39f2c0c15e fix(medusa): calculates correct taxes and totals on order with gift cards (#1807)
**What**
Since the release of the Tax API the line item totals calculations on orders with gift cards have been wrong. To understand the bug consider the below order:

Region:
- tax_rate: 25%
- gift_cards_taxable: true

Order:
- applied gift card: 1000
- items: 
  - A: unit_price: 1000
  - B: unit_price: 500
- Subtotal: 1500

**Previous calculation method**
1. Determine how much of the gift card is used for each item using `item_total / subtotal * gift_card_amount`:
  - Item A: 1000/1500 * 1000 = 666.67
  - Item B: 500/1500 * 1000 = 333.33
2. Calculate line item totals including taxes using `(unit_price - gift_card) * (1 + tax_rate)`
  - Item A: 1000 - 666.67 = 333.33; vat amount -> 83.33
  - Item B: 500 - 333.33 = 166.67; vat amount -> 41.67
3. Add up the line item totals: order subtotal = 500; vat amount = 125; total = 625

This is all correct at the totals level; but at the line item level we should still use the "original prices" i.e. the line item total for item a should be (1000 * 1.25) = 1250 with a tax amount of 250. 

**New calculation method**
1. Use default totals calculations
  - Item A: subtotal: 1000, tax_total: 250, total: 1250
  - Item B: subtotal: 500, tax_total: 125, total: 625
2. Add up the line item totals: subtotal: 1500, tax_total: 375, total: 1875
3. Reduce total with gift card: subtotal: 1500 - 1000 = 500, tax_total: 375 - 250 = 125, total = 625

Totals can now be forwarded correctly to accounting plugins.

Fixes CORE-310.
2022-07-11 12:18:43 +00:00
Philip Korsholm
3e197e3adf feat(medusa): Add feature flags to store response (#1819)
**What**
- Add `feature_flags` string array to store response

**Why**
- to provide conditional ui in admin corresponding to enabled features

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2022-07-11 09:42:58 +00:00
Oliver Windall Juhl
02967f95b1 fix(medusa): Refresh adjustments when region on cart is changed (#1827)
* fix(medusa): Refresh adjustments when region on cart is changed

* fix test

* Fix unit test

* fix: integration tests

* fix: comment
2022-07-11 10:51:55 +02:00
Sebastian Rindom
dffb86bb58 chore: turbo cleanup (#1828)
- Adds workspace-tools
- Updates .gitignore to include yarn/cache for zero-installs: https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
2022-07-11 08:47:48 +00:00
dependabot[bot]
6a2fd3b361 chore(deps): bump moment from 2.29.1 to 2.29.4 in /packages/gatsby-source-medusa (#1818)
Bumps [moment](https://github.com/moment/moment) from 2.29.1 to 2.29.4.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/moment/moment/blob/develop/CHANGELOG.md">moment's changelog</a>.</em></p>
<blockquote>
<h3>2.29.4</h3>
<ul>
<li>Release Jul 6, 2022
<ul>
<li><a href="https://github-redirect.dependabot.com/moment/moment/pull/6015">#6015</a> [bugfix] Fix ReDoS in preprocessRFC2822 regex</li>
</ul>
</li>
</ul>
<h3>2.29.3 <a href="https://gist.github.com/ichernev/edebd440f49adcaec72e5e77b791d8be">Full changelog</a></h3>
<ul>
<li>Release Apr 17, 2022
<ul>
<li><a href="https://github-redirect.dependabot.com/moment/moment/pull/5995">#5995</a> [bugfix] Remove const usage</li>
<li><a href="https://github-redirect.dependabot.com/moment/moment/pull/5990">#5990</a> misc: fix advisory link</li>
</ul>
</li>
</ul>
<h3>2.29.2 <a href="https://gist.github.com/ichernev/1904b564f6679d9aac1ae08ce13bc45c">See full changelog</a></h3>
<ul>
<li>Release Apr 3 2022</li>
</ul>
<p>Address <a href="https://github.com/moment/moment/security/advisories/GHSA-8hfj-j24r-96c4">https://github.com/moment/moment/security/advisories/GHSA-8hfj-j24r-96c4</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="000ac1800e"><code>000ac18</code></a> Build 2.24.4</li>
<li><a href="f2006b6479"><code>f2006b6</code></a> Bump version to 2.24.4</li>
<li><a href="536ad0c348"><code>536ad0c</code></a> Update changelog for 2.29.4</li>
<li><a href="9a3b5894f3"><code>9a3b589</code></a> [bugfix] Fix redos in preprocessRFC2822 regex (<a href="https://github-redirect.dependabot.com/moment/moment/issues/6015">#6015</a>)</li>
<li><a href="6374fd860a"><code>6374fd8</code></a> Merge branch 'master' into develop</li>
<li><a href="b4e615307e"><code>b4e6153</code></a> Revert &quot;[bugfix] Fix redos in preprocessRFC2822 regex (<a href="https://github-redirect.dependabot.com/moment/moment/issues/6015">#6015</a>)&quot;</li>
<li><a href="7aebb1617f"><code>7aebb16</code></a> [bugfix] Fix redos in preprocessRFC2822 regex (<a href="https://github-redirect.dependabot.com/moment/moment/issues/6015">#6015</a>)</li>
<li><a href="57c90622e4"><code>57c9062</code></a> Build 2.29.3</li>
<li><a href="aaf50b6bca"><code>aaf50b6</code></a> Fixup release complaints</li>
<li><a href="26f4aef9ca"><code>26f4aef</code></a> Bump version to 2.29.3</li>
<li>Additional commits viewable in <a href="https://github.com/moment/moment/compare/2.29.1...2.29.4">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=moment&package-manager=npm_and_yarn&previous-version=2.29.1&new-version=2.29.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/medusajs/medusa/network/alerts).

</details>
2022-07-10 13:41:34 +00:00
Philip Korsholm
812ba65d8f feat(medusa): Add streaming to Minio fileservice (#1619) 2022-07-10 12:34:28 +02:00
Zakaria El Asri
9fa4238ee4 chore: improve ci pipeline (#1764)
* fix: caching deps + add true parallelization to integration tests api

* fix: github action

* chore: upgrade to yarn berry (#1762)

* init migration

* remove: yarn.lock from all pkgs

* fix: build script in pkgs

* adjust yarn config

* fix: yarn.lock and yarnrc.yml

* fix: github actions

* fix: wrong type

* fix (medusa-react): use dts-cli instead of tsdx

* fix: yarn.lock

* fix: yarn v

* fix: prepare script

* add: comment on why we need to downgrade yarn before medusa-dev

* chore: move to Turborepo (#1763)

* increase number of parallel nodes

* fix (medusa-fulfillment-webshipper): build script

* fix: use new version of medusa-dev

* fix: rename cache-bootstrap to cache-deps
2022-07-10 12:11:11 +02:00
Adrien de Peretti
6715eb11de fix(medusa): Export data should always provide a file_key (#1785) 2022-07-10 11:38:27 +02:00
dependabot[bot]
65aea2fe36 chore(deps): bump moment in /packages/medusa-dev-cli (#1822)
Bumps [moment](https://github.com/moment/moment) from 2.29.1 to 2.29.4.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.1...2.29.4)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: indirect
2022-07-10 11:34:47 +02:00