medusa
medusa copied to clipboard
chore(): Autoload module resources
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
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
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| api-reference | 🔄 Building (Inspect) | Visit Preview | 💬 Add feedback | May 13, 2024 10:52am |
| medusa-dashboard | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 13, 2024 10:52am |
2 Ignored Deployments
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| docs-ui | ⬜️ Ignored (Inspect) | Visit Preview | May 13, 2024 10:52am | |
| medusa-docs | ⬜️ Ignored (Inspect) | Visit Preview | May 13, 2024 10:52am |
⚠️ No Changeset found
Latest commit: aa9aa3ba744b20a2887bb153b752462bfff72603
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Next up is the module service boilerplate 😉
Next up is the module service boilerplate 😉
Yes, it will be the last one, then only the custom loaders will remain to export if you have any. This is because we need to keep the order in which they are exported as it might have an impact. Maybe we can think of something there too 👍
@olivermrbl should be good to re review if you want 👍
Will do!
@shahednasser just for info it is merged now