Should not be merged before https://github.com/medusajs/medusa/pull/10895
**What**
- Introduces a new `plugin` command to `admin-bundler`, currently not used anywhere but will be called from `medusa build:plugin`
- Discovers plugins with extensions and add passes the to `admin-vite-plugin`.
- Updates `admin-vite-plugin` so its able to read built admin extensions.
Resolves CMRC-830, CMRC-839
Medusa v2.2.0 has a breaking change where the `state` must also be passed to the auth callback.
This is not mentioned in the required actions for breaking changes in the release notes. I spent more than an hour trying to understand why the upgrade was breaking Google auth login even though I followed the breaking changes release notes and the docs.
Please update it in the release notes as well if possible - https://github.com/medusajs/medusa/releases/tag/v2.2.0
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
Fixes: FRMW-2858
This PR merge the modules exported by the plugins with the modules defined within the user config. As a result, all modules get loaded without changing the internals of the loader.
However, you cannot disable the module of a plugin by re-adding it to the `modules` array. That is something we should handle separately.
We've added the breaking change label because of the following fix:
We did broke the ability to completely disable modules in the past pr's, in this pr we re add the ability to disable a module and that this modules does not get loaded at all. ([here](6dd164f783))
Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
The `createProductsWorkflow` allows passing an `inventory_items` property to assign the inventory items of a product variant, and we even pass it in the `/admin/products` API route when creating a variant, but the workflow's input type doesn't include that property. This PR adds it to the workflow's input type.
FIXES SUP-560
**What**
Currently, no matter the error when looking for a provider to exists in the container we are throwing a normalized error stating that the provider does not exists in the container. The issue is that the first initialization of the provider occurs the first time we resolve it, and the error can be that the provider failed to be instanciated for any reason.
In this pr, we are explicitly checking for the error to be an awilix resolution error to throw the classic error and otherwise we provide the issue why the provider failed to be resolved.
RESOLVES FRMW-2835
In this PR, we trace HTTP requests using the route pattern and not the request URL. This allows us to aggregate all HTTP requests under a single route.
In terms of implementation, we have to self find the route for a given request, since there is no API in express to do the same and we begin tracing even before the request is handed over to Express.
Since, the route matching happens via RegExp matches, we ensure that this does not add much performance overhead. The matching takes between 0.8ms-1.5ms for various different routes
Co-authored-by: Harminder Virk <1706381+thetutlage@users.noreply.github.com>