Commit Graph

5460 Commits

Author SHA1 Message Date
Shahed Nasser
2e861a9449 fix(create-medusa-app): ensure the same package manager is used consistently (#12714)
* fix(create-medusa-app): ensure the same package manager is used consistently

* fix verbose not working as expected

* improvements

* remove legacy peer deps

* format
2025-06-16 14:07:35 +03:00
Stevche Radevski
3ca02749c4 fix: Disable ensure database checks when establishing DB connection (#12734) 2025-06-13 16:45:49 +02:00
Oli Juhl
b79215dd5c fix(utils): Typecasting non-text fields in FTS (#12729) 2025-06-13 13:18:50 +02:00
Pedro Guzman
ebd4d70b6b Merge pull request #12684 from medusajs/pedro/keep-enum-values-in-types-generation
fix: keep enum values in types generation
fix: generate union types instead of enums
2025-06-13 13:15:56 +02:00
Stevche Radevski
bff5c00777 feat: Improve startup time by parallelizing module and link loading (#12731) 2025-06-13 13:11:19 +02:00
Pedro Guzman
8e3490d748 generate union types instead of enums 2025-06-13 12:23:58 +02:00
Pedro Guzman
4e9d2352f8 restore base schema in cleanAndMergeSchema in case modules define their own schemas 2025-06-13 12:23:58 +02:00
Pedro Guzman
827c49e87e fix graphql test 2025-06-13 12:23:58 +02:00
Pedro Guzman
66f27d5770 leave base medusa schema only in modules 2025-06-13 12:23:58 +02:00
Pedro Guzman
9e3b3667f8 fix joiner-config-builder test 2025-06-13 12:23:57 +02:00
Pedro Guzman
0fd0a0892b add full defaultMedusaSchema 2025-06-13 12:23:57 +02:00
Pedro Guzman
0409ef4886 add enumSchema directive to module graphQL schema 2025-06-13 12:23:57 +02:00
Pedro Guzman
c202c819e5 add enumValue directive to GraphQL schema 2025-06-13 12:23:57 +02:00
Pedro Guzman
6f09ca0800 fix: keep enum values in types generation 2025-06-13 12:23:56 +02:00
Adrien de Peretti
cbf3644eb7 chore(): Add retry strategy to database connection (#12713)
RESOLVES FRMW-2978

**What**
Add retry mechanism to database connection management to prevent failing when the server start faster than what makes the connection available
2025-06-13 07:18:49 +00:00
Riqwan Thamir
44d1d18689 feat(dashboard,types): add credit lines + loyalty changes (#11885)
* feat(dashboard,types): add credit lines + loyalty changes

* chore: fix types

* chore: fix specs

* chore: use correct plugin name

* chore: use new currency input

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-06-12 20:12:03 +02:00
Adrien de Peretti
ab634a14ba fix(utils): medusa internal service returned data should match typings (#12715)
FIXES SUP-1824

**What**
The medusa internal service update should always return the data in the expected shape described by the interface. The medusa service should not have to handle the reshapre
2025-06-12 15:55:49 +00:00
Frane Polić
672871b733 fix(core-flows): cart complete order address creation (#12493)
* fix(core-flows): cart complete order address creation

* fix(order): cascade delete addresses

* fix: revert
2025-06-12 15:07:50 +02:00
Frane Polić
2621f00bb0 feat(promotion, dashboard, core-flows, cart, types, utils, medusa): tax inclusive promotions (#12412)
* feat: tax inclusive promotions

* feat: add a totals test case

* feat: add integration test

* chore: changeset

* fix: typo

* chore: refactor

* fix: tests

* fix: rest of buyget action tests

* fix: cart spec

* chore: expand integration test with item level totals

* feat: add a few more test cases

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-06-12 15:07:11 +02:00
Harminder Virk
b316924572 fix: remote query types (#12712)
* fix: remote query types

* fix: breaking types

* Create eleven-falcons-return.md
2025-06-12 15:49:26 +05:30
Frane Polić
bd6d9777c5 fix(promotion, types): non discountable items check (#12644)
* fix(promotions): check if item is discountable

* fix: return earl yonly if non discountable

* fix: update test

* chore: add integration test
2025-06-12 10:23:06 +02:00
Shahed Nasser
774702153f fix(create-medusa-app): remove "Created admin user" message (#12707) 2025-06-11 13:53:07 +03:00
Shahed Nasser
5ba842bfb0 chore(core-flows,types,utils): fixes to TSDocs (#12692) 2025-06-10 18:33:41 +03:00
Harminder Virk
ce202968c6 fix: update product import template (#12697)
Closes: #12688
Fixes: FRMW-2977
2025-06-10 12:38:42 +00:00
Harminder Virk
f2cb528a56 feat: wire up direct uploads with local file provider (#12643) 2025-06-10 15:07:54 +05:30
Adrien de Peretti
1a78476608 fix(workflow-sdk): Async/nested runAsStep propagation (#12675)
FIXES CLO-524

**What**
Add hidden stepDefinition object as part of the step argument and ensure the runAsStep handlers rely on the latest definition when config is being used on the returned step in order to ensure async configuration propagation and nested configuration
2025-06-10 07:23:12 +00:00
github-actions[bot]
68a796d300 chore: Version Packages (#12583)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-05 20:33:53 +02:00
Luky Setiawan
4d19711d8e feat(admin): Add Bahasa Indonesia language support (#12657)
* [feat] add Indonesian json translation file

* [feat] include and export indonesian translation to index file

* [feat] export the indonesian language object to languages.ts

---------

Co-authored-by: luky <luzion1508@gmail.com>
2025-06-02 10:17:58 +02:00
Carlos R. L. Rodrigues
490bd7647f fix(core-flows): complete cart improvements (#12646)
* fix(core-flows): use cartId as transactionId and acquire lock to complete cart

* fix cart update compensation
2025-05-30 14:15:08 +01:00
Shahed Nasser
820965e21a fix(analytics): fix type of provider option (#12642) 2025-05-29 14:02:07 +03:00
Shahed Nasser
3d65807d99 fix(utils): export payment events in core flows events (#12636) 2025-05-29 10:10:26 +03:00
Harminder Virk
cf0297f74a feat: implement stream based processing of the files (#12574)
Fixes: FRMW-2960

This PR adds support for processing large CSV files by breaking them into chunks and processing one chunk at a time. This is how it works in nutshell.

- The CSV file is read as a stream and each chunk of the stream is one CSV row.
- We read upto 1000 rows (plus a few more to ensure product variants of a product are not split into multiple chunks).
- Each chunk is then normalized using the `CSVNormalizer` and validated using zod schemas. If there is an error, the entire process will be aborted and the existing chunks will be deleted.
- Each chunk is written to a JSON file, so that we can process them later (after user confirms) without re-processing or validating the CSV file.
- The confirmation process will start consuming one chunk at a time and create/update products using the `batchProducts` workflow.

## Resume or not to resume processing of chunks

Let's imagine during processing of chunks, we find that chunk 3 leads to a database error. However, till this time we have processed the first two chunks already. How do we deal with this situation? Options are:

- We store at which chunk we failed and then during the re-upload we ignore chunks before the failed one. In my conversation with @olivermrbl we discovered that resuming will have to work with certain assumptions if we decide to implement it.
   - What if a user updates the CSV rows which are part of the already processed chunks? These changes will be ignored and they will never notice it.
   - Resuming works if the file name is still the same. What if they made changes and saved the file with "Save as - New name". In that case we will anyways process the entire file.
   - We will have to fetch the old workflow from the workflow engine using some `ilike` search, so that we can see at which chunk the last run failed for the given file.

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2025-05-29 05:42:16 +00:00
Frane Polić
9866baa852 feat(core-flows,js-sdk,medusa,types): draft order delete (#12172) 2025-05-28 14:37:00 +02:00
Frane Polić
c4dd290461 fix(core-flows): reservation management on order edit and draft order confirm (#12546) 2025-05-28 09:52:01 +02:00
Frane Polić
341a8bb7ee fix(dashboard): combobox initial item cache (#12522) 2025-05-28 09:32:01 +02:00
Shahed Nasser
d155f492be chore(core-flows, types): change base64 comment fo files in TSDocs to binary (#12627)
* chore(core-flows, types): change base64 comment fo files in TSDocs to binary

* add in generatd
2025-05-27 18:35:39 +03:00
GuyPaikowsky
562f6288cd feat: add hebrew admin translation (#12603) 2025-05-27 16:45:49 +02:00
Shahed Nasser
528ab9f8a8 chore(types): fix example for createProductOptionValues in TSDocs and docs (#12623) 2025-05-27 12:45:21 +03:00
Michael
5b86b3b2bc update Chinese translation files (#12611)
Co-authored-by: Stevche Radevski <sradevski@live.com>
2025-05-27 09:17:17 +02:00
Harminder Virk
791276e80f feat: introduce bulkDelete method for IFileProvider (#12614)
Fixes: FRMW-2974

Currently during the product imports, we create multiple chunks that must be deleted after the import has finished (either successfully or with an error). Deleting files one by one leads to multiple network calls and slows down everything.

The `bulkDelete` method deletes multiple files (with their fileKey) in one go
2025-05-27 06:52:11 +00:00
Harminder Virk
1f5f50010a fix: expand method ALL for bodyparser config and additional validator (#12612)
Fixes: FRMW-2969
2025-05-26 10:22:26 +00:00
Shahed Nasser
7b3b4ff68a chore(core-flows): ignore hooks in complete cart workflow (#12600) 2025-05-23 18:48:46 +03:00
Harminder Virk
117fc25aea feat: run workflow hooks inside a when/then block (#11963)
* feat: run workflow hooks inside a when/then block

* fix conditionals and add test

---------

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>
2025-05-23 09:52:18 -03:00
Harminder Virk
f6f34cc0e4 fix: module import paths to contain unix slash (#12592)
Currently when types are generated on Windows, they result in using Windows slash for relative imports. This PR, fixes that to always use Unix imports
2025-05-23 08:09:34 +00:00
Adrien de Peretti
da5e278a78 chore(modules-sdk): Log full error when a loader fail to run (#12584)
* chore(modules-sdk): Log full error when a loader fail to run

* Create blue-ties-bow.md
2025-05-22 16:54:09 +02:00
Adrien de Peretti
7685d66c07 fix(framework): Fix compiler to create the dist after clean-up (#12582)
* fix(framework): Fix compiler to create the dist after clean-up

* Create angry-stingrays-fetch.md
2025-05-22 15:30:39 +02:00
Stevche Radevski
98798f305c fix: Correctly list files for all ids that are passed (#12575) 2025-05-22 14:52:05 +02:00
github-actions[bot]
5ad3615830 chore: Version Packages (#12576)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-22 14:04:27 +02:00
Christian
ca9ffcc80b feat: add presignedUrl method to upload sdk (#12569) 2025-05-21 22:21:50 +02:00
Frane Polić
c5a6573e26 fix(product, utils): handle metadata key deletion on product update (#12478) 2025-05-21 21:32:12 +02:00