* chore: Remove unused validations and utilities
* chore: Remove all resources that are not being loaded
* chore: Remove unused dependencies, typeorm related code and fix tests
* chore: Use createAdminUser in all module tests
* fix(medusa-oas-cli, oas-github-ci): updated paths to docs directories following monorepo reorganization
* revert change to workspaces
* change oas in workspaces
* revert change in test script
**What**
- First part of the product creation form.
- New components:
- ChipInput - Allows users to input chips into a input field. Chips are created by hitting the `,` or `Enter / Return` keys. Deleting a chip is done by hitting `Backspace` when the cursor is next to chip, or clicking the `X` button in the chip. Used for inputting option values.
- SortableList - A sortable drag-n-drop list that allows the user to re-arrange the order of items. Used for re-arranging the ranking of variants.
- ChipGroup - New re-usable component that is used to render a group of values as Chips. This should be used for SplitView form items.
- CategoryCombobox - (WIP) Nested Combobox component for selecting multiple categories a product should be associated with.
- New hooks:
- useComboboxData - Hook for easily managing the state of comboboxes.
- useDebouncedSearch - Hook for managing debounced search queries.
Supercedes #7051 – if OK, I'll move the base of this PR to `develop` and we can run reviews only of this one.
**What**
- Gracefully close BullMQ Worker in Redis Event Bus and Redis Workflow Engine (by @edast, @sradevski)
- Register workflows before MedusaApp is loaded*
- Introduce `onApplicationPrepareShutdown`**
- Refactor plugin resolving for reusability purposes
*We now register workflows before modules are loaded to ensure modules can run workflows as part of bootstrapping. E.g. the Redis Workflow Engine resumes workflows when it starts, which has until this change failed, because the workflows were not registered yet.
**We introduce a new hook to prepare resources for an application shutdown. E.g. closing the BullMQ worker as a preparatory step to closing the BullMQ queue. The worker will continue to process jobs while the queue is still open to receive new jobs (without processing them).
Co-authored-by: Stevche Radevski <4820812+sradevski@users.noreply.github.com>
Co-authored-by: Darius <618221+edast@users.noreply.github.com>
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
**What**
- Re-works how toasts work in Medusa UI. API is now built on top of `sonner` instead of `@radix-ui/react-toast`. This is a breaking change, and we will need to update the documentation once this has been merged and released (cc: @shahednasser).
- Adds an example of usage in the products list table in the new admin dashboard. As part of the coming weeks cleanup we will add toasts everywhere that they are currently missing.
CLOSES CORE-1977
**What**
- Sets up the initial work for Pricing domain
- Fixes Store domain
**Todo in follow up PR**
- Translations
- Add status when creating the Price List and allow updating it
- Improve DataGrid component
- Add missing functionality once backend support is added (customer_groups, region prices and update prices)
CLOSES CORE-1931
**What**
- Create main workflow
- Update create pricing rule types step to be idempotent
- update remote joiner to support granular isList confguration on field aliases
- Add full workflow integration tests
Fix `node-gyp` error that occurs during installation when using NPM and 20+ versions of Node.js. The error results from the package `@stdlib/number-float64-base-normalize` which is a dependency of `@segment/analytics-next`. Installing v0.0.8 resolves the error.
More details in PR #6485
## Testing
To test out the fix:
1. In a Medusa backend, remove the installation of `@stdlib/number-float64-base-normalize` (if available) and add instead the following override:
```json
"overrides": {
"@medusajs/admin": {
"@medusajs/admin-ui": "2.1.14-snapshot-20240405070935"
}
}
```
2. Remove node_modules + any previous package-lock.json
3. Change to node v20+ and use npm to install dependencies -> no error occurs during installation.
**What**
- Better error handling and error message
- update deps management and dynamic import/require
- Pass a new flag to the modules loaders for the module loaders to be able to act depending on it. In that case, the module can determine what should be run or not. e.g in the workflow engine redis, when we are only partially loading the module, we do not want to set the Distributed transaction storage
what:
- runs module and api integration tests in matrix strategy
- v28 of jest comes with sharding support, which we can utilize when we upgrade
- splits the tests by number of matrix jobs and run them in parallel
- This introduced some flakiness in some specs, but couldn't reproduce locally. Those have been skipped for now.
- uses swc/jest for added performance
- Locally, a chunk took 90 seconds with babel and 30 seconds with swc.
- This translated to 2 mins saved per shard in CI, but haven't tested this enough.
**What**
- v1 of executions domain
**TODO in follow up PR**
I think it might be a good idea for Carlos or Adrien to go over the design with Ludvig, and make sure we are displaying what is relevant to developers, and how things should be displayed. So this PR is just the initial implementation, and does not handle displaying things like compensation steps (not part of the current design), step input (not supported by the API but part of the design), etc.
Closes CORE-1751, CORE-1755