Commit Graph

13 Commits

Author SHA1 Message Date
Stevche Radevski
ee35379e21 chore: Rename all event keys to uppercase (#7787)
* chore: Rename all event keys to uppercase

* fix: Remove main entity from event builder
2024-06-21 10:41:35 +02:00
Adrien de Peretti
937a632eb6 chore: make module loaders DML aware and auto generate joiner config (#7781)
* chore: make module loaders DML aware and auto generate joiner config

* fixes and cleanup

* improve dml entity check

* add unit tests on load resources

* cleanup deps

* cleanup deps

* cleanup Modules

* finalise

* fix modules-sdk jest

* fix modules-sdk jest

* fix import

* fix import
2024-06-20 18:18:07 +02: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
d2a5201eeb chore: Refactor and improve abstract module service factory (#7688)
* chore: Refactor and improve abstract module service factory

* align naming

* clean up some template args and tests

* partially migrate modules

* partially migrate modules

* migrate more modules

* migrate last modules

* fix typings

* rename interface

* rename interface

* fixes

* fixes

* rm local plain tests
2024-06-13 13:12:37 +02:00
Riqwan Thamir
39ddba2491 chore: ability to group events on redis event bus (#7655)
* chore: ability to group events on redis event bus

* chore: fix tests

* Update packages/modules/event-bus-redis/src/services/event-bus-redis.ts

Co-authored-by: Adrien de Peretti <adrien.deperetti@gmail.com>

* chore: change shape of input and body data

* chore: fix builds

* chore: address comments

* chore: fix unit test

---------

Co-authored-by: Adrien de Peretti <adrien.deperetti@gmail.com>
2024-06-10 22:15:43 +02:00
Adrien de Peretti
2e77a076b8 feat: Add emitEvent step + cleanup (#7643)
* feat: Add emitEvent step + cleanup

* fix typo

* fix typo
2024-06-07 11:52:19 +02:00
Adrien de Peretti
9608bf06ef feat: Event emitting part 1/N (Fulfillment) (#7391)
**What**
Add support for event emitting in the fulfillment module

**NOTE**
It does not include the review of the events for the abstract module factory if the method is not implemented in the module itself and rely on the default implementation
2024-06-03 08:29:35 +00:00
Carlos R. L. Rodrigues
f1ced57d5f chore: payment auto capture + remove enum from utils (#7513)
What:

- handles payments session that are auto captured
- removes all the enums from `@medusajs/types`
- move all `@medusajs/types` to devDependencies
2024-05-29 11:12:59 +00:00
Carlos R. L. Rodrigues
9dae86daa2 chore: es target 2021 (#7325) 2024-05-14 08:07:14 -03:00
Adrien de Peretti
63623422fe chore(): Autoload module resources (#7291)
**What**
- automatically build and consume connection and container loader if not exported by the module
- therefore load the services and repositories automatically, including baseRepository
- automatically build run and revert migrations if not provided
- cleaup modules to remove extra unnecessary bits and pieces
- remove the `initializeFactory` in favor of using `medusaApp`

Should drastically improve the module building DX by removing a lot of boilerplate to handle by the user, that plus the base entity should simplify quite a lot the flow cc @shahednasser 

**Note**
I had to choose a way to identify connection and container loader from the exported loader from the module. I decided to go with named function `connectionLoader` and `containerLoader`, also, now the factories will return named function so if the user use the factories we are providing to build those loaders, the function will also be named and identified
2024-05-13 12:12:36 +00:00
Oli Juhl
e78362c000 chore: Remove legacy MWH modules (#7213)
* chore: Remove legacy MWH modules

* chore: Add stock-location deps
2024-05-02 20:07:42 +02:00