Kasper Fabricius Kristensen
57573ed4d7
feat(medusa): Alternative Subscriber API and new ScheduledJobs API ( #5624 )
...
* workking subscribers API
* progress
* update registrar args
* cleanup
* progress
* progress
* tests
* rename to loaders
* rm build artifacts
* improve validation and change jobs args to object
* spread context on subscribe
* add changeset
* address comments
* fix spelling of warning and add warning on Redis not enabled for Scheduled Jobs
* fix tests
---------
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com >
2023-11-16 20:36:02 +01:00
Riqwan Thamir
4f0bea4909
fix(pricing): add missing migrations for pricing module ( #5646 )
2023-11-16 14:26:00 +00:00
Kasper Fabricius Kristensen
a67a8e7e90
fix(ui): Fixed CodeBlock line number width ( #5640 )
...
**What**
- Fixes the width of lineNumbers in the CodeBlock component according to the widest number.
- Introduces a new prop on snippets that allows users to hide the copy button. Also updated docs to reflect this.
Before:

After:
<img width="742" alt="image" src="https://github.com/medusajs/medusa/assets/45367945/5ce845f7-b8c7-411c-abfb-fa03448aeb1a ">
Closes #5639
2023-11-16 10:50:04 +00:00
Shahed Nasser
95aa5a2d28
docs: generate inventory and stock location references ( #5645 )
2023-11-16 11:10:23 +02:00
Riqwan Thamir
1772e80ed1
feat(pricing,types): price list API + price calculations with price lists ( #5498 )
...
**what:**
**PriceList Service APIs:**
- createPriceList
- updatePriceList
- addPriceListPrices
- removePriceListRules
- setPriceListRules
- deletePriceList
- listPriceLists
- listAndCountPriceLists
**Price Calculations**
- Returns prices with price list prices
- Returns a new shape with calculated and original prices
Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com >
2023-11-15 20:24:29 +00:00
Kasper Fabricius Kristensen
2947f57db1
fix(medusa): Update wrapHandler so it also passes errors in non-async route handlers to the errorHandler middleware ( #5597 )
...
* fix: Align @types/react versions across UI packages
* update codeowners
* fix: Update wrapHandler so it also catches errors for non-async route handlers
* rm chaining
* align wrapHandler in utils and add deprecation note
---------
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com >
2023-11-15 19:41:10 +01:00
Kasper Fabricius Kristensen
c08240df3f
fix(admin-ui): Preserve decimal numbers when locale uses commas ( #5641 )
...
**What**
- Ensure that we format numbers with `.` as the decimal separator, even when the users locale uses `,`. This changes still allows users to use comma as the decimal separator, but the transformation we use before writing to state converts the number to use a dot instead.
2023-11-15 17:18:26 +00:00
Shahed Nasser
61aef4aaa7
chore(types): Add TSDoc comments to IInventoryService ( #5630 )
...
* chore(types): Add TSDoc comments to IInventoryService
* fix description of list methods
* address PR feedback
2023-11-15 17:40:25 +02:00
Shahed Nasser
e13995ff2f
chore: add TSDocs for IStockLocationService ( #5631 )
...
* chore: add TSDocs for IStockLocationService
* address feedback
2023-11-15 15:54:20 +02:00
Kasper Fabricius Kristensen
52800710a2
fix(medusa): Error handling middleware should be applied when no config is exported ( #5634 )
...
**What**
- Fixes an issue where the default errorHandler middleware was not applied if the user did not have a `middlewares.ts` file.
- Updates the type of `MiddlewaresConfig` so `middlewares` is now optional, as people might want to only set a bodyParser config for a matcher and not provide any additional middleware.
2023-11-14 20:48:10 +00:00
chemicalkosek
7226f5b699
fix(medusa): Add missing promiseAll import ( #5635 )
2023-11-14 19:37:00 +01:00
Victor Gerbrands
3f016d871a
fix(admin-ui): sort supported languages alphabetically ( #5479 )
...
## What?
Added sorting to the `supportedLanguages` array in `packages/admin-ui/ui/src/i18n/index.ts`. This makes sure the languages in the dropdown are sorted alphabetically.

## Why?
As we're supporting more languages in the admin UI, this list was getting messy.
## How?
By using `sort()` and `localeCompare()` on array declaration.
## Testing
Go to Medusa Admin locally, login and navigate to Settings > Personal information to test the language dropdown.
2023-11-14 15:09:57 +00:00
Shahed Nasser
b1826a8e01
chore: add missing error responses to currency OAS ( #5627 )
2023-11-14 10:18:37 +02:00
Shahed Nasser
c6dff873de
docs: update docusaurus to v3 ( #5625 )
...
* update dependencies
* update onboarding mdx
* fixes for mdx issues
* fixes for mdx compatibility
* resolve mdx errors
* fixes in reference
* fix check errors
* revert change in vale action
* fix node version in action
* fix summary in markdown
2023-11-13 20:11:50 +02:00
Riqwan Thamir
cedab58339
feat(workflows,medusa,utils): add medusa v2 feature flag ( #5603 )
...
* chore: add medusa v2 feature flag
* chore: cleanup more FF
* chore: cleanup workflows FF
* chore: add comments on broken specs
* chore: added check for package registration
* chore: reenable workflows FF for create order workflow
* chore: disable FF on test cli db
* chore: hide loader validation behind FF
* chore: use medusa v2 enabled
* chore: register feature flag router in use-db
* chore: change to minro
2023-11-13 16:18:05 +01:00
olivermrbl
03e56aed74
chore: Release
2023-11-10 10:38:47 +01:00
github-actions[bot]
71d59d2c81
chore: Version Packages ( #5527 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-10 10:28:21 +01:00
adamlamaa
203e1fccb4
feat(medusa): Include Product Collections in Seed command ( #5510 )
2023-11-10 08:55:08 +01:00
Adrien de Peretti
4ad66c1795
fix(medusa): Load legacy modules entities ( #5594 )
2023-11-10 08:51:55 +01:00
Kasper Fabricius Kristensen
e3f1da92db
fix(admin-ui, ui): Align @types/react versions across UI packages ( #5596 )
...
* fix: Align @types/react versions across UI packages
* update codeowners
2023-11-10 08:31:30 +01:00
Rick Lam
b4e8adfcf9
fix(admin-ui): Admin UI: Invalid Request Header ( #5548 )
...
**What**
Fix of https://github.com/medusajs/medusa/issues/4904
**Fixes**
Admin run development server with hostname shown Invalid Request Header
**How**
Added webpack-dev-server config [allowedHosts](https://webpack.js.org/configuration/dev-server/#devserverallowedhosts ) and [webSocketUrl](https://webpack.js.org/configuration/dev-server/#websocketurl ) in admin develop options to change allowlist services hostname and Web Socket Url
**Testing**
Edit medusa-config.js with hostname in admin plugin develop options
```
const plugins = [
// ...
{
resolve: "@medusajs/admin",
/** @type {import('@medusajs/admin').PluginOptions} */
options: {
develop: {
allowedHosts: [
'host.com',
'subdomain.host.com',
'subdomain2.host.com',
'host2.com',
],
webSocketURL: 'wss://host.com/ws'
},
},
},
]
```
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com >
2023-11-09 12:32:27 +00:00
Shahed Nasser
91615f9c45
chore: improve JS Client TSDoc comments ( #5582 )
...
* add oas schema to tsdoc parser
* add tsdoc (part 1)
* Finished tsdoc in js client
* general fixes
* added tsdoc in core medusa package
* parse schema tags in model files
* added maxlevel option
* added more tsdoc
* added tsdoc in core
* added TSDoc in core package
* generated client types
* support featureFlag and expandable tags
* added support for resource feature flag note
* fix api ignore plugin
* added eslint plugin
* support feature flag and expandable badges
* adjusted overview page + generated reference
* revert generated files
* added changeset
* add details about new typedoc options
* fix broken link
2023-11-09 12:51:17 +02:00
Kasper Fabricius Kristensen
c68da6d685
feat(medusa): API routes body parser config ( #5537 )
2023-11-09 09:10:45 +01:00
Adrien de Peretti
f90ba02087
feat(utils): Introduce promiseAll util ( #5543 )
2023-11-08 08:48:48 +01:00
Kasper Fabricius Kristensen
e4ce2f4e07
chore(ui,icons,ui-preset,toolbox): Move design system packages to monorepo ( #5470 )
2023-11-07 22:17:44 +01:00
Egor Makarenko
09ab1d1be6
feat(create-medusa-app): print error message for failed db connection ( #5547 )
...
`create-medusa-app` currently prints a generic error message when it cannot connect to a database. This tiny pull request adds the thrown error to the log message, that simplifies debugging of installation issues
2023-11-06 16:37:10 +00:00
Shahed Nasser
2576a0fd23
docs(api-reference): added local server to list of servers ( #5572 )
...
* docs(api-reference): added local server to list of servers
* fix publishable api key route
2023-11-06 17:30:56 +02:00
Kasper Fabricius Kristensen
d7e1887221
fix(admin-ui): Prevent comma decimal separator from converting inputs to NaN ( #5566 )
...
**What**
- Using the Price List bulk editor with a locale that uses comma as the decimal separator would convert decimal numbers to NaN. This PR fixes that by replacing commas with dots, before passing the values on to the state manager.
Closes #5565
2023-11-06 13:26:35 +00:00
Adrien de Peretti
f88d75b0a7
feat(product, pricing, utils): Transaction issues and reference issues ( #5533 )
...
* feat(product, pricing, utils): Transaction issues and reference issues
* fixes decorators
* cleanup
* fix product module upsert
* fix missing active manager
* increase timeout
* revert package.json
* WIP
* try another node version based on findings with memory issues with jest introduced after 16.11 but fixed in 21
* re add bail
* fix variant options
* chore: bulk create pricing
* chore: workflow bulk
* Create big-chefs-dream.md
* fix missing update for upserty
* Add integration tests for product options upsert
* rm unnecessary return
* fix product prices workflow issue
* cleanup
* fix flag
* fix model
---------
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com >
Co-authored-by: Carlos R. L. Rodrigues <rodrigolr@gmail.com >
Co-authored-by: Riqwan Thamir <rmthamir@gmail.com >
2023-11-06 12:24:29 +01:00
Adrien de Peretti
154c9b43bd
feat(medusa, modules-sdk, types, utils): Re work modules loading and remove legacy functions ( #5496 )
2023-11-02 17:59:13 +01:00
Kasper Fabricius Kristensen
f7e9829881
fix(admin-ui): Prevent oversized product request in Price List domain ( #5535 )
...
* fix(admin-ui): Prevent oversized product request in Price List domain
* add changeset
2023-11-02 17:05:08 +01:00
Kasper Fabricius Kristensen
8e48be58ef
fix(admin-ui): Make regions in tax setting scrollable ( #5530 )
...
* fix overflow
* intersection observer and changeset
2023-11-02 13:03:45 +01:00
github-actions[bot]
aa2bb7a31b
chore(docs): Generated References ( #5516 )
...
Generated the following references:
- `js-client`
- `pricing`
- `services`
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com >
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com >
2023-11-02 09:16:47 +00:00
Adrien de Peretti
80fe362f33
fix(integration): setup ( #5511 )
...
* fix(integration): setup
2023-11-01 13:56:12 -04:00
github-actions[bot]
309c82e175
chore: Version Packages ( #5454 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-01 08:19:58 +01:00
Kunal Agrawal
201b35cd31
feat(admin-ui): add Hindi Translation ( #5452 )
2023-10-31 16:53:52 +01:00
Kasper Fabricius Kristensen
2548ea8e5e
fix(medusa): Make file based routing compatible with Windows pathing ( #5497 )
2023-10-31 14:46:24 +01:00
Ramzi Youssef
4ce8279d25
fix(admin-ui): Enhanced 'activity-drawer' visibility with z-index adjustment ( #5315 )
2023-10-31 14:39:13 +01:00
pepijn-vanvlaanderen
2057d3b247
fix(admin-ui) Custom batch job activity card ( #5288 )
2023-10-31 11:22:28 +01:00
Philip Korsholm
9ff22110a6
fix(medusa): Add inventory decoration for cart endpoints ( #5187 )
...
**What**
- decorate item totals for `cart.item.variant` when adding a line-item and retrieving a cart
closes #5181
2023-10-31 09:55:30 +00:00
huuduc2312
ca05436fc1
feat(admin-ui): add Vietnamese translation ( #5442 )
2023-10-31 10:36:05 +01:00
Adrien de Peretti
a780b92b8d
fix(medusa): Add admin get product tests ( #5480 )
2023-10-31 08:54:06 +01:00
Shahed Nasser
c1b97050ab
feat(medusa-oas-cli,oas-github-ci): new options + added download of OAS in api reference ( #5453 )
2023-10-31 08:05:48 +01:00
Shahed Nasser
03959c3e3a
feat(create-medusa-app): improve spinner style ( #5474 )
...
* feat(create-medusa-app): improve spinner style
* remove comment
2023-10-31 08:02:40 +01:00
Philip Korsholm
4d52082bf0
feat(medusa): variant creation with prices in productservice.create ( #5410 )
2023-10-30 17:22:57 +01:00
Oli Juhl
397da6c2ba
fix(admin-ui): TIP in shipping option creation ( #5356 )
...
* fix(admin-ui): TIP in shipping option creation
* Create six-pigs-return.md
2023-10-30 15:17:34 +01:00
Yersultan
3e5c6f5d8c
feat(admin-ui): Add Russian translation ( #5142 )
2023-10-30 15:12:49 +01:00
Philip Korsholm
148f537b47
feat(medusa): integrate pricing module to core ( #5304 )
...
* add pricing integraiton feature flag
* init
* first endpoint
* cleanup
* remove console.logs
* refactor to util and implement across endpoints
* add changeset
* rename variables
* remove mistype
* feat(medusa): move price module integration to pricing service (#5322 )
* initial changes
* chore: make product service always internal for pricing module
* add notes
---------
Co-authored-by: Riqwan Thamir <rmthamir@gmail.com >
* nit
* cleanup
* update to object querying
* update cart integration test
* remove uppercase currency_code
* nit
* Feat/admin product pricing module reads (#5354 )
* initial changes to list prices for admin
* working price module implementation of list prices
* nit
* variant pricing
* redo integration test changes
* cleanup
* cleanup
* fix unit tests
* [wip] Core <> Pricing - price updates (#5364 )
* chore: update medusa-app
* wip
* get links and modules working with migration
* wip
* chore: make test pass
* Feat/rule type utils (#5371 )
* initial rule type utils
* update migration script
* chore: cleanup
* ensure prices are always decorated
* chore: use seed instead
* chore: fix oas conflict
* region id add to admin price read!
---------
Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com >
Co-authored-by: Philip Korsholm <philip.korsholm@hotmail.com >
* pr feedback
* create remoteQueryFunction type
* fix merge
* fix loaders issue
* Feat(medusa, types, pricing): pricing module migration script (#5409 )
* add migration script for money amounts in pricing module
* add changeset
* rename file
* cleanup imports
* update changeset
* add check for pricing module and ff
* feat(medusa,workflows,types): update prices on product and variant update (#5412 )
* wip
* chore: update product prices through workflow
* chore: cleanup
* chore: update product handler updates prices for variants
* chore: handle reverts
* chore: address pr comments
* chore: scope workflow handlers to flag handlers
* chore: update return
* chore: update db url
* chore: remove migration
* chore: increase jest timeout
* Feat(medusa): update migration and initDb to run link-migrations (#5437 )
* initial
* loader update
* more progress on loaders
* update integration tests and remote-query loader
* remove helper
* migrate isolated modules
* fix test
* fix integration test
* update with pr feedback
* unregister medusa-app
* re-register medusaApp
* fix featureflag
* set timeout
* set timeout
* conditionally run link-module migrations
* pr feedback 1
* add driver options for db
* throw if link is not defined in migration script
* pass config module directly
* include container in migrate command
* chore: increase timeout
* rm redis from api integration tests to test
* chore: temporarily skip tests
* chore: undo skips + add timeout for workflow tests
* chore: increase timeout for order edits
* re-add redis
* include final resolution
* add sharedcontainer to medusaapp loader
* chore: move migration under run command
* try removing redis_url from api tests
* chore: cleanup server on process exit
* chore: clear container on exit
* chore: adjustments
* chore: remove consoles
* chore: close express app on finish
* chore: destroy pg connection on shutdown
* chore: skip
* chore: unskip test
* chore: cleanup container pg connection
* chore: skip
---------
Co-authored-by: Riqwan Thamir <rmthamir@gmail.com >
2023-10-30 14:42:17 +01:00
Kasper Fabricius Kristensen
b69f182571
fix(admin-ui): modify webpack config to prevent throwing sourcemap errors ( #5484 )
2023-10-30 12:06:58 +01:00
Adrien de Peretti
a45da9215d
fix(medusa, modules-sdk, modules): Module loading missing dependencies + remote query reference issue ( #5468 )
2023-10-26 20:24:38 +02:00