Commit Graph

17 Commits

Author SHA1 Message Date
Adrien de Peretti
e096feb7d5 chore: Update modules deps (#9286) 2024-09-26 11:14:35 +05:30
Carlos R. L. Rodrigues
950cf9af79 chore: remove container registration name (#9137) 2024-09-16 06:22:24 -03: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
Adrien de Peretti
2711012d96 feat: Make the Module require the service name (#7923)
* feat: Make the Module require the service name

* finalize types
2024-07-03 15:44:57 +02:00
Adrien de Peretti
617a5972bf feat: refactor module joiner config and links generation (#7859)
* feat: refactor module joiner config and links generation

* improve typings

* WIP

* WIP

* WIP

* rename type file

* create link config

* finish typings and add utils

* improve links

* WIP typings

* finalize ExportModule utils

* finalize ExportModule utils

* fix: dml tests

* improve and fixes

* simplify typings with id changes

* add toJSON

* multiple fixes and entity builder fixes

* fix currency searchable

* fix tests

* medusa service refactoring

* cleanup

* cleanup and fixes

* make module name optional

* renaming

---------

Co-authored-by: Harminder Virk <virk.officials@gmail.com>
2024-07-03 13:12:49 +02:00
Carlos R. L. Rodrigues
a7844efd09 chore: move ModuleRegistrationName to utils (#7911) 2024-07-03 06:30:56 -03:00
Stevche Radevski
8244fe03b7 fix: Several fixes based on preview testing (#7906)
* fix: Add searchable properties on currency

* fix: Format product type dates in table

* fix: Preserve line whitespace in section row

* fix: Continue through tabs on Enter in create product form

* fix: Pagination in variant prices section

* fix: Add missing inventory edit item translation

* fix: Use the correct options URL for editing

* fix: Correctly get the variant title in inventory item details

* fix: Completely remove variant titles section in inventory item
2024-07-02 14:56:34 +02:00
Adrien de Peretti
66d17fabde chore: rename extractor type to InferEntityType (#7829) 2024-06-25 13:43:11 +02:00
Riqwan Thamir
96fb7a962e feat(utils,currency): Migrate currency to use DML (#7807) 2024-06-24 19:07:26 +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
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
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
Harminder Virk
11528526fa feat: loosely typed container 2024-05-31 15:22:03 +05:30
Oli Juhl
dbb23d20be chore: Remove currency + country logs (#7508) 2024-05-28 16:42:32 +02:00
Stevche Radevski
ee924b1b28 feat: Add a simple configurable notifications subscriber (#7331)
* feat: Add a simple configurable notifications subscriber that is configurable

* Proposal on awaiting all subscribers to run

* fix: Clean up wait subscribers util and notifications test

---------

Co-authored-by: adrien2p <adrien.deperetti@gmail.com>
2024-05-16 13:36:09 +02: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
Adrien de Peretti
4eae25e1ef chore(): Reorganize modules (#7210)
**What**
Move all modules to the modules directory
2024-05-02 15:33:34 +00:00