Adrien de Peretti
ad3524ffbe
feat: Add useQueryStep ( #9384 )
...
* feat: Query step replacement
* fix
* fix types
2024-10-07 12:07:06 +02:00
Harminder Virk
d98f22c7d6
Feat: Move container bindings declaration merging within the framework ( #9467 )
2024-10-04 15:47:06 +05:30
Harminder Virk
48e00169d2
breaking: move shared HTTP utils to the framework ( #9402 )
...
Fixes: FRMW-2728, FRMW-2729
After this PR gets merged the following middleware will be exported from the `@medusajs/framework/http` import path.
- applyParamsAsFilters
- clearFiltersByKey
- applyDefaultFilters
- setContext
- getQueryConfig
- httpCompression
- maybeApplyLinkFilter
- refetchEntities
- unlessPath
- validateBody
- validateQuery
Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com >
2024-10-03 09:42:00 +00:00
Carlos R. L. Rodrigues
8155c4e9ee
fix(workflows-sdk): when then return value ( #9427 )
2024-10-02 07:40:39 -03:00
Adrien de Peretti
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
Shahed Nasser
20943902f9
chore: update imports in tsdocs ( #9379 )
2024-10-01 11:04:03 +02:00
Harminder Virk
a578313db9
feature: bundle all modules ( #9324 )
2024-09-30 09:04:03 +02:00
Harminder Virk
48bea267dc
chore: perform dependencies scan and fix all dependencies ( #9296 )
2024-09-26 14:14:38 +05:30
Harminder Virk
9e711720dd
chore: upgrade moduleResolution to Node16 ( #9269 )
2024-09-24 17:19:20 +05:30
Harminder Virk
9f72fb5902
Chore: cleanup workflows SDK ( #9244 )
...
Fixes: FRMW-2712
2024-09-23 11:04:38 +00: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
Harminder Virk
653a4bff71
feat: add tracing to workflow steps ( #9140 )
2024-09-17 11:35:38 +05:30
Carlos R. L. Rodrigues
ef8dc4087e
feat: run nested async workflows ( #9119 )
2024-09-16 13:06:45 +00:00
Carlos R. L. Rodrigues
950cf9af79
chore: remove container registration name ( #9137 )
2024-09-16 06:22:24 -03: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
matteoxplo
91f17fb176
fix: Workflow always print "error:" even if there are none ( #8978 )
...
Fix issue [https://github.com/medusajs/medusa/issues/8976 ](https://github.com/medusajs/medusa/issues/8976 )
2024-09-04 12:17:25 +00: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
Oli Juhl
2bacf86d3c
chore: Remove prepublishOnly script ( #8699 )
...
* wip
* wip
* verbose logging
* remove prepublish scripts
* chore: add back prepublish scripts
* wip
* remove prepublishOnly script
* chore: Clean up rest of build scripts
* add back build script
* feedback
---------
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com >
2024-08-27 10:31:38 +02:00
Carlos R. L. Rodrigues
3b4eea08ef
chore: peer dependency version ( #8771 )
...
* fix peer dependency version
* dotenv
* commands
* dotenv cli
2024-08-26 21:55:57 +02:00
Carlos R. L. Rodrigues
058378970a
chore: dependecies reorg ( #8535 )
2024-08-23 07:16:04 -03:00
Carlos R. L. Rodrigues
eb0bfe9f33
feat(workflows-sdk): log on error ( #8666 )
2024-08-20 06:23:24 -03:00
Harminder Virk
9cd66bc842
feature: share execution context with hook handlers ( #8501 )
2024-08-08 17:18:07 +05:30
Stevche Radevski
4155d0354f
fix: Use a global reference to distributed transaction and scheduler ( #8462 )
...
* fix: Add storage cleanup on scheduled jobs
* fix: Use a global reference to distributed transaction and scheduler classes
2024-08-06 14:14:51 +02:00
Shahed Nasser
6fc2019534
chore(workflows-sdk): add TSDocs related to create-hook ( #8380 )
2024-08-01 09:57:14 +03:00
Harminder Virk
864bb0df05
breaking: implement workflow hooks (first iteration) ( #8346 )
2024-07-31 15:36:38 +05:30
Carlos R. L. Rodrigues
24c105f288
feat(orchestration,workflows-sdk): Skip step ( #8334 )
2024-07-29 14:26:47 -03: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
53ddea717c
fix: workflow return type inf missing type ( #8133 )
2024-07-15 14:40:03 +03:00
Carlos R. L. Rodrigues
4321241553
feat(core-flows): request return on order exchanges and claims ( #8107 )
...
FIXES: CC-92, CC-87
2024-07-12 15:48:24 +00:00
Carlos R. L. Rodrigues
de36e2b36e
chore: rename return flow ( #8050 )
2024-07-10 08:09:10 -03: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
Carlos R. L. Rodrigues
9badad24aa
feat(workflows-sdk): conditional step ( #7912 )
...
* chore: move ModuleRegistrationName to utils
* chore(workflows-sdk): conditional step
* type
* when condition
2024-07-05 10:54:18 +02:00
Carlos R. L. Rodrigues
61758f374b
chore(medusa): return endpoints ( #7823 )
2024-06-25 13:53:18 +00:00
Riqwan Thamir
03924a4ff6
chore: move to swc/jest ( #7739 )
...
* chore: move to swc
* chore: fix tax rate tests
* chore: undo failed test
* chore: fix unit tests script
* chore: use node 20
* Update scripts/run-workspace-unit-tests-in-chunks.sh
2024-06-20 12:59:33 +02:00
Adrien de Peretti
48963f55ef
Chore/rm main entity concept ( #7709 )
...
**What**
Update the `MedusaService` class, factory and types to remove the concept of main modules. The idea being that all method will be explicitly named and suffixes to represent the object you are trying to manipulate.
This pr also includes various fixes in different modules
Co-authored-by: Stevche Radevski <4820812+sradevski@users.noreply.github.com >
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com >
2024-06-19 13:02:16 +00:00
Riqwan Thamir
3d33f06e77
chore: upgrade jest everywhere ( #7703 )
2024-06-14 07:35:30 +02:00
Adrien de Peretti
dd0b9f0805
feat: workflows release events ( #7664 )
...
* feat: Release grouped events once a worfklow finish
* update common step
* update types
* tests
* optionality
* fies
* cancel flow on release failure
* clear events on fail
* more tests
* log errors
* log more errors
* update missing interface method declaration
* fix missing return
* update mock
* fix tests
2024-06-11 15:48:15 +02:00
Adrien de Peretti
afae395fea
chore: ensure the event group id is kept for async workflow ( #7668 )
...
* chore: ensure the event group id is kept for async workflow
* revert test
* fix tests
---------
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com >
Co-authored-by: Riqwan Thamir <rmthamir@gmail.com >
2024-06-11 13:20:17 +02:00
Stevche Radevski
69410162f6
feat: Add support for scheduled workflows ( #7651 )
...
We still need to:
But wanted to open the PR for early feedback on the approach
2024-06-10 14:49:52 +00:00
Adrien de Peretti
c9c2b6c88f
chore: Ensure the transactionId/eventGroupId are passed down the child workflows ( #7648 )
2024-06-07 12:38:04 +02:00
Adrien de Peretti
3cd2d60daa
feat: Ensure the event group id is either generated or picked up from the context ( #7646 )
...
**What**
- Pick the context event group id or generate it to be accessible from the workflow and down the module calls
FIXES CORE-2273
2024-06-07 09:14:02 +00:00
Carlos R. L. Rodrigues
41df24e2dc
chore(workflows-sdk): check exported workflow ( #7592 )
2024-06-04 07:18:40 -03:00
Harminder Virk
11528526fa
feat: loosely typed container
2024-05-31 15:22:03 +05:30
Oli Juhl
ad21bd30b1
fix: errors thrown in transformer ( #7480 )
...
* chore: wup
* throw on error
* add back test
---------
Co-authored-by: Carlos R. L. Rodrigues <rodrigolr@gmail.com >
2024-05-28 08:44:33 +02:00
Adrien de Peretti
fff1b3ef9c
chore(medusa, workflows-sdk): Workflow default to throw the first error ( #7442 )
...
**What**
Currently when a workflow fail it will throw an error which contains the messages of all error thrown durring the workflow lifetime. Therefore, in our cases we are always preventing workflow to throw and grab the first error that we then re throw.
This pr eliminate that need by throwing back the first error among the error thrown by a workflow as it is the main case. In case someone need a special handling they can still set the option throwOnError to false and handle the error the way they need
2024-05-24 12:55:05 +00:00
Carlos R. L. Rodrigues
f3d19f5394
fix(workflows-sdk): use loaded modules when container is empty ( #7422 )
2024-05-23 08:26:16 -03:00
Adrien de Peretti
a775d57255
feat(core-flows, types): Create return order ( #7319 )
...
**what**
- Create return workflow partial implementation
- Update some order domain types
- create order fulfillment link
**NOTE**
this PR is partially done but can still be merged as is, it will require some discussions around the flow and some unknowns or uncertainty in regards to some data and some behaviour
2024-05-16 14:10:54 +00:00
Carlos R. L. Rodrigues
9dae86daa2
chore: es target 2021 ( #7325 )
2024-05-14 08:07:14 -03:00
Carlos R. L. Rodrigues
aba194de9a
chore: complete cart part 2 ( #7227 )
2024-05-05 10:35:09 -03:00
Adrien de Peretti
bbccd6481d
chore(): start moving some packages to the core directory ( #7215 )
2024-05-03 13:37:41 +02:00