Adrien de Peretti and GitHub
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 and GitHub
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 and GitHub
f74fdcb644
breaking: rework how links database migrations are managed ( #8162 )
2024-07-22 13:12:23 +05:30
Adrien de Peretti and GitHub
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 and GitHub
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
f579f0b3be
feat: restructure events payload ( #8143 )
...
* refactor: restructure events payload
Breaking change: This PR changes the event payload accepted by the event
listeners
* refactor: fix failing tests and implement feedback
* add integration tests
* fix timeout
---------
Co-authored-by: Adrien de Peretti <adrien.deperetti@gmail.com >
2024-07-16 17:09:16 +01:00
Adrien de Peretti and GitHub
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
Harminder Virk and GitHub
5bb870948a
fix: defineMikroOrmCliConfig helper to provide default db credentials ( #8131 )
2024-07-15 15:49:00 +05:30
Adrien de Peretti and GitHub
104b00d4e9
feat(migrations): CLI generate command ( #8103 )
2024-07-12 13:12:49 +02:00
Shahed Nasser and GitHub
85c15dbb25
fix(utils): error message when isQueryable is possibly not enabled. ( #8096 )
2024-07-11 18:54:43 +02:00
Adrien de Peretti and GitHub
79ec2bcfe2
fix: Migration generator and generated migrations ( #8090 )
2024-07-11 18:21:09 +02:00
Shahed Nasser and GitHub
66acb3023e
fix(migrations): small fix to the text ( #8091 )
...
Small fix to the migrations text.
2024-07-11 13:16:11 +00:00
Harminder Virk and GitHub
e489b0c037
fix: gracefully handle migrations that cannot be reverted ( #8087 )
2024-07-11 17:40:34 +05:30
Harminder Virk and GitHub
45c573b03a
Feat: Improvements to the migrations CLI and workflow ( #8060 )
2024-07-11 16:52:34 +05:30
Adrien de Peretti and GitHub
1789b8e315
chore: properly infer return type from model config ( #8079 )
2024-07-11 10:36:07 +02:00
Carlos R. L. Rodrigues and GitHub
f460348280
fix(utils): define link alias + pluralize ( #8070 )
...
What:
* Fix alias of models that have "compound names": eg "related_product"
* `deleteCascade` option
* Package to pluralize english words correctly
2024-07-10 22:37:14 +00:00
Adrien de Peretti and GitHub
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
Harminder Virk and GitHub
4b391fc3cf
Initial implementation with just the generate method ( #7973 )
2024-07-09 12:32:02 +05:30
Adrien de Peretti and GitHub
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 and GitHub
b450628481
fix: error 4082 when using defineLink ( #8014 )
2024-07-08 12:05:44 +02:00
Adrien de Peretti and GitHub
9750047af1
chore: Rename entity to model ( #7977 )
...
**What**
Start renaming `entity` to `model`
2024-07-08 07:43:49 +00:00
Adrien de Peretti and GitHub
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
1393f51046
fix: Improve get caller file path util ( #7974 )
...
* fix: Improve get caller file path util
* improve compatibility
* update comment
---------
Co-authored-by: Riqwan Thamir <rmthamir@gmail.com >
2024-07-05 12:54:27 +02:00
Adrien de Peretti and GitHub
f49139b20f
fix: custom link resolution in medusa app ( #7950 )
...
* fix custom link resolution in medusa app
* improve
* fix duplicate
2024-07-04 16:50:53 +02:00
Adrien de Peretti and GitHub
7b84d854f0
Feat/mikro orm based linkable ( #7944 )
...
**What**
- Generate simple linkable for mikro orm based modules
- fix module util
- fix joiner config builder
- fix define link relationship extension
- fix migrations not loading custom links
2024-07-04 13:30:47 +00:00
Adrien de Peretti and GitHub
cb36655b63
chore: Update defineMikroOrmCliConfig api ( #7940 )
...
* chore: Update defineMikroOrmCliConfig api
* update usage
2024-07-04 12:58:43 +02:00
Adrien de Peretti and GitHub
41c4307fc7
feat: define link util ( #7931 )
...
* feat: define link util
* handle pluralized fieldAlias for isList
* serviceName ar reference
* finalize
* todo
* WIP
* finalize
* fix tests
* update typings
* fix Module
* linkable
* update errors
2024-07-04 10:37:30 +02:00
Harminder Virk and GitHub
cc3eb8698d
fix: omit mikro orm entities values from the config ( #7938 )
2024-07-04 13:21:52 +05:30
Riqwan Thamir and GitHub
b6e4435c23
chore: cleanup migrations logs ( #7924 )
...
what:
when running `medusa run migrations`, cleanup logs with short descriptive message.
Before:
<img width="1262" alt="Screenshot 2024-07-03 at 14 31 36" src="https://github.com/medusajs/medusa/assets/5105988/504e9c24-371c-476d-9b6d-2dfe1a4088dc ">
After:
<img width="1004" alt="Screenshot 2024-07-03 at 14 42 57" src="https://github.com/medusajs/medusa/assets/5105988/a89eaed5-04a4-4efb-a2e9-ca480f1eaa6e ">
2024-07-03 13:53:59 +00:00
Adrien de Peretti and GitHub
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
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 and GitHub
17e6a83b59
fix(utils): joiner config from medusa project ( #7896 )
2024-07-01 13:48:34 -03:00
Stevche Radevski and GitHub
9daec5d7ac
chore: Migrate notification module to DML ( #7835 )
2024-07-01 09:17:32 +00:00
Adrien de Peretti and GitHub
66d17fabde
chore: rename extractor type to InferEntityType ( #7829 )
2024-06-25 13:43:11 +02:00
34c44078e7
fix: DML relation management for many to one relation ship foreign keys ( #7790 )
...
FIXES CORE-2369
cc @thetutlage
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com >
2024-06-24 18:54:54 +00:00
Oli Juhl and GitHub
25210369d9
fix(utils): Uppercase event action name ( #7822 )
...
Currently, the keys of the events contain a lowercased action, e.g. `INVENTORY_ITEM_created`, which is breaking our usage across multiple modules
2024-06-24 17:43:49 +00:00
Riqwan Thamir and GitHub
96fb7a962e
feat(utils,currency): Migrate currency to use DML ( #7807 )
2024-06-24 19:07:26 +02:00
Adrien de Peretti and GitHub
021f5ea016
fix: medusa service should infer names when not provided ( #7818 )
...
* fix: medusa service should infer names when not provided
* fix types
* fix typings
2024-06-24 16:35:44 +02:00
Adrien de Peretti and GitHub
27bb93c5b5
chore: Fix export and option of mikro orm define config util ( #7809 )
2024-06-24 09:31:52 +00:00
Adrien de Peretti and GitHub
ae6dbc06be
chore: Update module test runner to support DmlEntities when needed ( #7799 )
...
* chore: Update module test runner to support DmlEntities when needed
* update es version for core test utils
* fix test
* update swc config
2024-06-24 09:44:01 +02:00
8fa43a6db3
Feat/define mikro orm configuration dev ( #7798 )
...
* chore: define mikro orm config for CLI
* add tests
* fix types
* fix import
---------
Co-authored-by: Riqwan Thamir <rmthamir@gmail.com >
2024-06-24 09:10:54 +02:00
Adrien de Peretti and GitHub
90e6ca0e9e
chore: Internal medusa service proper typings with DML ( #7792 )
2024-06-21 12:36:54 +02:00
Stevche Radevski and GitHub
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 and GitHub
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
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 and GitHub
e0b14519f1
fix: Medusa service base method transaction ( #7758 )
...
**What**
Remove transaction decorator from the base medusa service method, the transaction will always be coming from the shared context. It fixes the issue that when you consume a base method directly it will return a proper tuple from the DB instead of the one from the entity map cc @VariableVic
**NOTE**
This pr also fix some categories issues in the product module which was preventing the tests from working. if @sradevski you could have a look later, in the mean time we can still merge it
FIXES CORE-2342
2024-06-18 10:58:54 +00:00
Adrien de Peretti and GitHub
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
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 and GitHub
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 and GitHub
3f62bfad5a
fix: should disable db connection ssl when some url params are provided ( #7634 )
...
**What**
Enable ssl identification from the client url query params as well
2024-06-06 14:52:12 +00:00