Adrien de Peretti
d8b7f90689
chore(product): Update the events emitted from the product module ( #9557 )
2024-10-14 09:19:32 -03:00
Adrien de Peretti
5a60a2a329
fix(utils): Cascade soft deletion management ( #9534 )
...
* fix(utils): Cascade sOCoft deletion management
* fix(utils): Cascade sOCoft deletion management
2024-10-14 11:35:38 +02:00
Adrien de Peretti
5c9e289c4d
fix(utils): build query conversion breaking the underlying API operator map ( #9533 )
2024-10-11 18:03:58 +02:00
Adrien de Peretti
1d8939df3a
chore(): Allow to register modules through array ( #9522 )
2024-10-11 15:17:00 +02:00
Adrien de Peretti
9c73503084
chore: swc/jest source maps config to inline instead of true ( #9531 )
2024-10-11 09:40:51 +02:00
Adrien de Peretti
7c5415ba3a
fix(workflows-sdk):transaction id inheritence ( #9507 )
2024-10-10 17:08:42 +02:00
Adrien de Peretti
34d57870ad
chore: workflow internals improvementss ( #9455 )
2024-10-10 09:11:56 +02:00
Adrien de Peretti
ad3524ffbe
feat: Add useQueryStep ( #9384 )
...
* feat: Query step replacement
* fix
* fix types
2024-10-07 12:07:06 +02:00
Adrien de Peretti
ffc35f2b6e
fix: Remove extra saving on serialization which breaks the chain ( #9465 )
...
**What**
The extra serialization check hapen to break the serialization chain by reusing already serialized entities when they have been serialized from a different parents sequence
2024-10-05 07:53:56 +00:00
Adrien de Peretti
eea2bfdef1
chore(cli): Update start description ( #9448 )
...
**What**
Update description of the start command
2024-10-04 15:11:29 +00:00
Adrien de Peretti
5a573928c4
fix(core-flows): update cart promotion data usage ( #9456 )
...
**What**
The nullish coalescing can't really work since we are using proxies under the hood which is present
2024-10-04 07:19:47 +00:00
Adrien de Peretti
193f93464f
fix(core-flows): Remove concurrent steps that rely on the same data update ( #9438 )
...
**What**
The `updateTaxLinesWorkflow` rely on the cart shipping method meaning that concurrent refresh of shipping method can impact tax lines therefore leading to wrong tax lines
2024-10-03 09:00:32 +00:00
Adrien de Peretti
225d00cd09
chore: improve mikro orm serializer circular ref and link serialization ( #9411 )
2024-10-03 08:22:11 +02:00
Adrien de Peretti
8753b178da
chore: Processing filters deeply looking at the current joiner first ( #9428 )
...
* chore: Processing filters deeply looking at the current joiner first
* fix
* fix
2024-10-02 14:17:12 +02:00
Adrien de Peretti and Riqwan Thamir
02629625ec
feat(orchestration): Provide hint in workflows error ( #9400 )
...
* feat(orchestration): Provide hint in workflows error
* remove log
* fix tests
* improve stack
* fix type
* formatting
---------
Co-authored-by: Riqwan Thamir <rmthamir@gmail.com >
2024-10-02 11:54:07 +02:00
Adrien de Peretti
13a3c1bd77
fix(utils): knex import ( #9408 )
2024-10-01 16:34:48 +02:00
Adrien de Peretti
b9e772b530
chore: Add import from framework types at the top of ay generated types file ( #9389 )
2024-10-01 08:53:52 +02:00
Adrien de Peretti
9b6d0e9d56
fix(medusa): Replace default http tracer ( #9390 )
2024-09-30 16:17:30 -03:00
Adrien de Peretti
7484cef0fa
chore: Improve instrumentation loading ( #9378 )
...
* chore: Improve instrumentation loading
* fix build
* fix buildgst
2024-09-30 11:22:23 +02:00
Adrien de Peretti
7e73fe4794
chore: Improve jest config and deps ( #9318 )
2024-09-30 10:50:59 +02:00
Adrien de Peretti
a4fc9d6e0b
fix(medusa): Instrumentation resolution ( #9368 )
2024-09-30 08:55:46 +02:00
Adrien de Peretti
38778b37e2
fix: remove dist access for modules in integration tests ( #9336 )
2024-09-27 09:11:03 +02:00
Adrien de Peretti
6854feaf50
chore(utils): Cleanup and improve message aggregator ( #9300 )
...
* chore(utils): Cleanup and improve message aggregator
* fix
2024-09-26 17:00:03 +02:00
Adrien de Peretti
c2f023c02f
chore: Add support for module dependencies configuration ( #9330 )
...
**What**
Add support to specify which dependencies a module have during the tests and grab them from the injected dependencies
2024-09-26 14:00:42 +00:00
Adrien de Peretti
a8e19faf8d
chore: use framework sub paths everywhere ( #9253 )
2024-09-26 16:38:38 +05:30
Adrien de Peretti
fba78c0fb1
chore: remove direct usage from graphql ( #9316 )
...
**What**
Remove direct usage of graphql toold and instead consume it from utils to have a single entry point to graphql tooling
2024-09-26 08:18:26 +00:00
Adrien de Peretti
e096feb7d5
chore: Update modules deps ( #9286 )
2024-09-26 11:14:35 +05:30
Adrien de Peretti
ae320ac73f
fix: base tsconfig ( #9309 )
...
* fix: base tsconfig
* WIP
* wi[]
* update integration typescript version
* update lock file
* fix deps
* fix medusa tests runner
2024-09-25 16:31:57 +02:00
Adrien de Peretti
6e5d007837
fix: Generated types interface name ( #9307 )
...
**What**
Fix interface name in the output generated types
2024-09-25 12:32:07 +00:00
Adrien de Peretti
74cdb9d4b6
fix(modules-sdk): Fix dynamic import usage ( #9304 )
...
* fix(modules-sdk): Fix dynamic import usage
* missing new line
2024-09-25 13:29:00 +02:00
Adrien de Peretti
358435d715
chore: Move graphl to a single place ( #9303 )
...
* chore: Move graphl to a single place
* add new line
2024-09-25 12:04:25 +02:00
Adrien de Peretti
802f204d31
fix(orchestration): Throw if not exists using filters ( #9275 )
2024-09-24 17:12:04 +02:00
Adrien de Peretti
6937d74252
chore(): Move dependencies around ( #9278 )
...
RESOLVES FRMW-2716 [1]
**What**
First stab at re organising dependencies in the modules and their usage.
2024-09-24 14:58:04 +00:00
Adrien de Peretti
90d530565b
chore(): Remove default limit from the build query ( #9257 )
...
* chore(): Remove default limit from the build query
* rm take: null
* fix tests
* fix tests
* fix db usage
* fix typo
* rm unsused template arg
* fixes
* fixes
* fixes
* fixes
* fixes
* fixes
* fixes
2024-09-24 16:06:45 +02:00
Adrien de Peretti
e1fdc54a3f
chore(medusa-test-utils): Add custom link loading before syncing ( #9249 )
...
**What**
Include custom links to be loaded from the medusa integration test runner
2024-09-23 19:54:04 +00:00
Adrien de Peretti
8ec323b1da
refactor(types): Align configuration and fixes ( #9240 )
...
RESOLVES FRMW-2712
**What**
Refactor types packages to use the latest configuration of typescript and fixes issues
2024-09-23 12:13:02 +00:00
Adrien de Peretti
94e07c8da0
refactor(framework): Align configuration and fixes ( #9246 )
...
* refactor(framework): Align configuration and fixes
* refactor(framework): Align configuration and fixes
* move framework
* rm unnecessary script
* update jest config
2024-09-23 13:07:30 +02:00
Adrien de Peretti
79e3578932
refactor(orchestration): Align configuration and fixes ( #9242 )
...
RESOLVES FRMW-2712
**What**
Refactor orchestration packages to use the latest configuration of typescript and fixes issues
2024-09-23 10:36:05 +00:00
Adrien de Peretti
919d19095a
refactor(modules-sdk): Align configuration and fixes ( #9239 )
...
* refactor(modules-sdk): Align configuration and fixes
* typo
* fix configuration
2024-09-23 12:12:26 +02:00
Adrien de Peretti
3084008fc9
feat(index): Provide a similar API to Query ( #9193 )
...
**What**
Align the index engine API to be similar to the Query API
## Example
```ts
// Benefit from the same level of typing like the remote query
const { data, metadata } = await indexEngine.query<'product'>({
fields: [
"product.*",
"product.variants.*",
"product.variants.prices.*",
],
filters: {
product: {
variants: {
prices: {
amount: { $gt: 50 },
},
},
},
},
pagination: {
order: {
product: {
variants: {
prices: {
amount: "DESC",
},
},
},
},
},
})
```
2024-09-20 10:02:42 +00:00
Adrien de Peretti
270a9a1770
fix(medusa-test-utils): get port should a deps for now ( #9198 )
2024-09-19 14:44:16 +02:00
Adrien de Peretti and Carlos R. L. Rodrigues
58167b5dfa
feat(index): Index module foundation ( #9095 )
...
**What**
Index module foundation
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com >
2024-09-18 19:04:04 +00:00
Adrien de Peretti
a734184538
chore(): Handle medusa service base methods events ( #9179 )
...
* chore(): Handle medusa service base methods events
* cleanup
* cleanup
* fix import
* fix decorator order
* fixes
* apply default event emition
* fix binding
* fix binding
* align tests with new event emition
2024-09-18 17:57:00 +02:00
Adrien de Peretti
81d3ae01c7
chore: Cleanup manager decorator usage ( #9181 )
2024-09-18 14:16:20 +02:00
Adrien de Peretti
a227d73e4f
fix(workflow-sdk): Use the correct event group ID from the flow metadata ( #9177 )
2024-09-18 12:52:21 +02:00
Adrien de Peretti
c6795dfc47
feat(modules-sdk): Parse filters based on loaded modules graph ( #9158 )
2024-09-17 14:20:04 -03:00
Adrien de Peretti
03d6b64a20
fix(): Query Missing bindings ( #9131 )
2024-09-13 18:22:38 +02:00
Adrien de Peretti
f0c470cb08
chore(workflows-sdk): Update hook functions type ( #9117 )
...
RESOLVES FRMW-2703
**What**
Update types to reflect both invoke and compensate function for hooks
2024-09-13 07:11:45 +00:00
Adrien de Peretti
a9b559ab2e
fix(dml): Throw when many to many are not configured properly ( #9085 )
...
**What**
When both sides of a many to many relationship do not define the mapped by option, it leads to misconfigured relations and a malformed SQL query. (ref. https://github.com/medusajs/medusa/issues/9075 )
- When both mapped by are not defined, infer look up to try to identify the missing configuration if any
- Disallow defining many to many only on one side
2024-09-12 07:08:24 +00:00
Adrien de Peretti
a01e7e4ffe
chore: Register Query in container ( #9103 )
...
* chore(framework): Register the query
* chore(framework): Register the query
2024-09-11 15:08:46 +02:00
Adrien de Peretti
e56607c97c
fix(medusa-test-utils): Run with modules without models ( #9062 )
...
* fix(medusa-test-utils): Run with modules without models
* cleanup
* rm dummy model
* rm dummy model
* improve models loading
* find models
* find models
* find models
* finalize
* cleanup
* fix deps
* fix deps
* fix deps
* fix deps
* fix deps
2024-09-10 14:22:21 +02:00
Adrien de Peretti
423bae1d73
chore(modules-sdk): Move Query and cleanup ( #9054 )
...
* chore(modules-sdk): Move Query and cleanup
* cleanup
* fix memoization
2024-09-09 12:42:17 +02:00
Adrien de Peretti
2c5e72d141
feat: Application types generation from project GQL schema's ( #8995 )
2024-09-06 15:15:32 +05:30
Adrien de Peretti
479e712c17
fix(core-flows): Handle variant creation duplicate inventory item ids ( #8937 )
...
* fix(core-flows): Handle variant creation duplicate inventory item ids
* disabled already selected options
* address feedback
* fix tests
2024-09-02 18:36:42 +02:00
Adrien de Peretti
99461e24ab
feat(notification): Handle long running transaction and add status support ( #8900 )
...
RESOLVES FRMW-2110
RESOLVES FRMW-2095
**What**
- Fix notification module to not retain transactions open while sending notification
- Add support for notification status [success, pending, failure]
2024-09-01 08:01:47 +00:00
Adrien de Peretti
3da01035f3
fix: Shipping profile deletion with options ( #8910 )
...
* fix(fulfillment): Prevent deletion of profiles associated to options
* add tests
* typo
* address feedback
2024-08-30 17:04:29 +02:00
Adrien de Peretti
bd20d66968
fix(link-module): Migration planner not closing connection correctly ( #8881 )
...
RESOLVES CC-405
**What**
Fixing mikro orm connection not closed during sync-links
2024-08-29 15:10:13 +00:00
Adrien de Peretti
77b874f272
feat: Add support for providers to validate their options at loading time ( #8853 )
...
* feat: Add support for providers to validate their options at loading time
* fix missing removal
* fix integration tests
* add tests
2024-08-29 09:08:49 +02:00
Adrien de Peretti
52e394055c
fix(utils): DML hasOne - belongsTo not behaving correctly ( #8813 )
...
FIXES FRMW-2676
**What**
ref: https://discord.com/channels/876835651130097704/1023889804544458752/threads/1276979858781503528
Currently, when providing the following
```ts
const user1 = manager.create(User, {
username: "User 1",
team: {
name: "Team 1",
},
})
```
It would result in an error inserting into the database because the foreign key will be sent twice as part of the insert, one for the relation and one for the foreign key that both relate to the foreign key property.
To fix that and allow both approaches (providing the entity to cascade persist or just providing the foreign key in case of another side nullable relation) we need to handle it a bit differently.
now both approaches would be valid. the entities for the example might not be the best ones but it is just to illustrate
option 1 - we create both the user and the team:
```ts
const user1 = manager.create(User, {
username: "User 1",
team: {
name: "Team 1",
},
})
```
option 2 - the team already exists (for example the previous user have been detached from the team but we kept the team alive and assign a new user to that team) :
```ts
const user1 = manager.create(User, {
username: "User 1",
team_id: team.id
})
```
2024-08-28 15:45:48 +00:00
Adrien de Peretti
5bec38538a
chore: Treat internal event differently, primarely do not display info logs for those events ( #8767 )
...
* chore: Treat internal event differently, primarely do not display info log for those events
* revert doc
* add few tests
* only set internal option if present
* revert to previous condition
* start including feedback after discussion
* include feedback
* fix modules integration tests
* fix modules integration tests
* fix event bus local
2024-08-28 16:46:40 +02:00
Adrien de Peretti
5294ce8654
chore(medusa): Re enable plugin loading ( #8843 )
...
* chore(medusa): Re enable plugin loading
* finalise
2024-08-28 15:38:51 +02:00
Adrien de Peretti
b09c19912b
fix(orchestration, workflow-sdk): Local workflow separated orchestrator ( #8765 )
...
FIXES TRI-174
**What**
Currently, every time a Local workflow is being instantiated, it will grab the global workflow definition including the orchestrator instance. This leads to issues when we have concurrent running workflows which all register their event listeners to this single orchestrator instance which can lead to exhausting the listerners.
With this fix, every local workflow will have a copy of the global workflow definition plus a new instance (cloned) of the orchestrator meaning that from now on, every local workflow will have its own orchestrator.
2024-08-27 08:59:56 +00:00
Adrien de Peretti
8bde27153a
fix(framework/config): Properly resolve env variables ( #8411 )
2024-08-02 16:24:32 +02:00
Adrien de Peretti
e44332ba62
chore(framework): Allow multiple source dir for subcribers loader ( #8407 )
...
* chore(framework): Allow multiple source dir for subcribers loader
* re add log
* add logs
2024-08-02 13:55:48 +02:00
Adrien de Peretti
9950a7efe2
chore(framework): medusa app loaders ( #8393 )
...
RESOLVE FRMW-2636
**What**
cleanup and move medusa app loader for now
2024-08-02 10:38:36 +00:00
Adrien de Peretti
f81652bf6e
chore(framework): Move and improve routes loader ( #8392 )
...
* chore(framework): Move and improve routes loader
* cleanup
* fix(framework): import
2024-08-01 16:18:42 +02:00
Adrien de Peretti
4a7b2fd625
fix(framework): telemetry package version ( #8378 )
2024-07-31 14:46:38 +00:00
Adrien de Peretti
56602d215b
chore(framework): Move and improve workflows loader ( #8363 )
...
**What**
Refactoring Workflows loader and move
FIXES FRMW-2627
2024-07-31 14:46:04 +00:00
Adrien de Peretti
27837b8833
fix(framework): prepublish script ( #8377 )
2024-07-31 14:00:54 +00:00
Adrien de Peretti
12c6a1a022
chore(framework): Move and improve links loader ( #8367 )
...
**What**
Refactor and move links loader
FIXES FRMW-2637
2024-07-31 12:33:12 +00:00
Adrien de Peretti
6ccf83128c
Chore/framework 6/n ( #8356 )
...
**What**
Refactor and improve job loader as well as move it to the framework
FIXES FRMW-2626
2024-07-31 09:17:17 +00:00
Adrien de Peretti
a9fea986b0
chore(framework): Move and improve subscriber loader ( #8347 )
...
**What**
Move `SubscriberLoader` and improve implementation
FIXES FRMW-2635
2024-07-30 12:54:31 +00:00
Adrien de Peretti
9b6de8c02d
chore(framework): Move feature flags related resources and cleanup ( #8297 )
...
**What**
cleanup and move the feature flag related resources to manage them.
It also include some refactoring around loading and registering the flag as well as not relying on the `glob` package anymore plus some reorganization of the code itself
FIXES FRMW-2625
2024-07-30 12:20:03 +00:00
Adrien de Peretti and Oli Juhl
bcd9d9c2b1
chore(framework): Continue to move loaders to framework ( #8258 )
...
**What**
More move and cleanup
FIXES FRMW-2603
FIXES FRMW-2608
FIXES FRMW-2610
FIXES FRMW-2611
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com >
2024-07-30 08:52:12 +00:00
Adrien de Peretti
75ec53e45a
chore(framework): update deps ( #8261 )
...
* chore(medusa): update framework deps
* update lock
* update deps
* fix
2024-07-24 11:38:50 +02:00
Adrien de Peretti
2188a4e1ba
fix: isList on field alias in link configuration ( #8244 )
...
* fix/link-configuration-is-list-on-fieldsAlias
* fix tests
* fix tests
* fix tests
2024-07-24 10:18:38 +02:00
Adrien de Peretti
47dde05517
chore(framework): Initial commit ( #8221 )
...
**What**
- Initiate the framework package (which is just a place to move things around for now)
- move the config loader and related resources as well as the `ConfigModule` type
- Create a ConfigManager singleton which prepare and store the config (later can be stored entirely in the container) and allow for easier test override
- re export the logger from the framework
- replace medusa config loader with the framework one
- `build` run type check on tests as well but `prepublishOnly` will not fail on build if tests are typed broken
FIXES FRMW-2607
FIXES FRMW-2609
FIXES FRMW-2614
FIXES FRMW-2618
2024-07-23 15:46:28 +00:00
Adrien de Peretti
a9abf448c6
fix(utils): Fix inferrence of public method name and service registration name based on configuration ( #8237 )
2024-07-23 14:43:46 +02:00
Adrien de Peretti
c307972a99
chore(medusa): rm default created at field ( #8213 )
...
**What**
To maintain the backward compatibility, we use to populate `created_at` no matter what. But since we can break things from v1, I ll remove it as we moved the default ordering to the repository layer
2024-07-22 08:20:14 +00:00
Adrien de Peretti
f74fdcb644
breaking: rework how links database migrations are managed ( #8162 )
2024-07-22 13:12:23 +05:30
Adrien de Peretti
566300d54b
fix: normalize path before consuming it while loading models ( #8194 )
...
* fix: normalize path before consuming it while loading models
* Make it so that models derived from the service if present
* fix linkable tests that now match what has been passed to the medusa service if there is no custom joiner config
* fix linkable tests that now match what has been passed to the medusa service if there is no custom joiner config
* fix linkable tests that now match what has been passed to the medusa service if there is no custom joiner config
2024-07-21 21:21:05 +02:00
Adrien de Peretti
ecc97076b5
chore: default isQueryable module ( #8192 )
...
* chore: default isQueryable module
* fix defaults
* fix
2024-07-19 16:14:42 +02:00
Adrien de Peretti
35c3759ed8
fix: workflow 'when' should return T or undefined instead of Partial<T> ( #8195 )
...
* fix: workflow 'when' should return T or undefined instead of Partial<T>
* fix when usage
2024-07-19 10:46:55 +02:00
Adrien de Peretti
398e39d163
fix: product module joiner config ( #8170 )
...
* fix: product module joiner config
* fix aliases
* revert package.json
* add js doc
2024-07-18 11:27:21 +02:00
Adrien de Peretti
4af7309170
fix: install modules-sdk for test-utils to work ( #8142 )
2024-07-16 12:00:24 +02:00
Adrien de Peretti
8a68919ed3
chore: Allow to fetch remote link using the service name or the alias from the use remote link step ( #8140 )
...
* chore: Allow to fetch remote link using the service name or the alias from the use remote link step
* revert package.json
* fix packages
2024-07-16 11:03:41 +02:00
Adrien de Peretti
53ddea717c
fix: workflow return type inf missing type ( #8133 )
2024-07-15 14:40:03 +03:00
Adrien de Peretti
136da3f3ce
fix: Handle multiple id prop generation ( #8097 )
...
* fix: Handle multiple id prop generation
* throw on duplicate id + cleanup
* fix mistakenly removed files
* fix
* fix
* passzord string
* passzord string
2024-07-12 16:41:19 +02:00
Adrien de Peretti
f6e86f1b99
chore: temporarely disabling link revert ( #8105 )
2024-07-12 15:05:56 +02:00
Adrien de Peretti
104b00d4e9
feat(migrations): CLI generate command ( #8103 )
2024-07-12 13:12:49 +02:00
Adrien de Peretti
79ec2bcfe2
fix: Migration generator and generated migrations ( #8090 )
2024-07-11 18:21:09 +02:00
Adrien de Peretti
143847ace4
fix: Investigate geo zones with address checks ( #8066 )
...
* fix: Investigate geo zones with address checks
* rm debug
* fix constraint building checks
* add more explanation
2024-07-11 11:11:42 +02:00
Adrien de Peretti
1789b8e315
chore: properly infer return type from model config ( #8079 )
2024-07-11 10:36:07 +02:00
Adrien de Peretti
e778870c68
chore: Ensure the events are emitted with the same shape all accross ( #8063 )
...
* chore: Ensure the events are emitted with the same shape all accross
* fixes:
* rm unsues type
* types
* fix tests
2024-07-10 19:34:28 +02:00
Adrien de Peretti
10848c8bf2
chore: rename source to linkable in defineLink options ( #8016 )
...
* chore: rename source to linkable in defineLink options
* rm unused const
2024-07-08 16:44:03 +02:00
Adrien de Peretti
fc7f5ff71a
fix: Modules providers loading mechanism to infer the source dir ( #8015 )
...
* fix: Modules providers loading mechanism to infer the source dir
* finalize
2024-07-08 14:11:45 +02:00
Adrien de Peretti
b450628481
fix: error 4082 when using defineLink ( #8014 )
2024-07-08 12:05:44 +02:00
Adrien de Peretti
9750047af1
chore: Rename entity to model ( #7977 )
...
**What**
Start renaming `entity` to `model`
2024-07-08 07:43:49 +00:00
Adrien de Peretti
b24c8503d5
feat: Add types to the workflow conditional ( #7979 )
...
**What**
Add typing to the when conditional workflow step
FIXES CORE-2494
2024-07-05 14:43:16 +00:00
Adrien de Peretti
b368251ca3
chore: Migrate modules to use the Module util ( #7964 )
...
**What**
Apply the `Module` util to each module to handle the export and provide the linkable configuration object.
- Most joiner config that does not have any special config are removed/cleaned up in favor of the autogenerated one or simpler one
- linkable are now available in all modules
- cleaned up the dependencies of the modules
FIXES CORE-2410
2024-07-05 13:00:40 +00:00