Commit Graph
7468 Commits
Author SHA1 Message Date
Riqwan ThamirandGitHub 1758bfb8d0 fix(dashboard, core-flows): improvements to order page on canceled orders (#10888)
what:

- Remove pending payment for canceled orders
- Hide unfulfilled items for canceled orders
- Disable non refundable payments from being refunded
- Populate refund created_by
- Disable order edit when canceled
- Fix bug https://github.com/medusajs/medusa/issues/10852

RESOLVES CMRC-842
2025-01-13 16:51:38 +00:00
Riqwan ThamirandGitHub 7232a8a930 fix(core-flows): return refunded when all captured payments have been refunded (#10923)
what:

- returns refunded when all captured payments have been refunded
2025-01-13 16:25:39 +00:00
Shahed NasserandGitHub 60dc8f69c7 chore(core-flows,types): improve tsdocs of workflows [1] (#10940) 2025-01-13 18:09:55 +02:00
Adrien de PerettiandGitHub b7a3759824 feat(cli): Add plugin:publish and plugin:add commands support (#10938)
RESOLVES FRMW-2864
RESOLVES FRMW-2868

**What**
Add support for the following cli commands:
- `plugin:publish`
- `plugin:add`
2025-01-13 14:24:49 +00:00
Adrien de PerettiandGitHub c895ed8013 feat: Scaffold plugin in create-medusa-app (#10908)
RESOLVES FRMW-2862

**What**
This PR enable the `create-medusa-app` CLI to accept a new `--plugin` option to scaffold a plugin. This is complementary to all the plugin commands being created/adjusted separately to that pr.
Also, this pr brings a little refactoring around resource scaffolding, the idea was to contain the refactoring to a little area and not expend it to the entire create-medusa-app package to not disrupt and expand the scope for which the purpose was to introduce the plugin scaffolding capabilities

**Addition**
- medusa project will get their package.json name changed to the project name
- Remove build step from medusa project creation

**Plugin flow**

- in the plugin
  - `npx create-medsa-app --plugin`
  - `yarn dev`
- in the project
  - `yalc add plugin-name`
  - `yarn dev`

Any changes on the plugin will publish, push in the local registry which will fire the hot reload of the app and include the new changes from the plugin
2025-01-13 14:18:42 +00:00
Harminder VirkandGitHub b0f581cc7c feat: add plugin build command (#10935)
Fixes: FRMW-2863

Adds the `plugin:build` command that is used to compile the source code of a plugin for publishing it to a package registry. The command is similar to the `build` command, except it does not copy the `package.json` and the `lock` files to the build output
2025-01-13 13:33:54 +00:00
Ranjith kumarandGitHub b0cfb05bd1 docs: remove redundant body parameter in fetch customer (#10934) 2025-01-13 15:13:53 +02:00
Shahed NasserandGitHub 4250c292eb docs: fix authentication callback descriptions to include all query parameters (#10932) 2025-01-13 15:12:06 +02:00
Shahed NasserandGitHub 55ff7e4dcd docs: add a note about promotion types support in Medusa Admin (#10933) 2025-01-13 15:11:45 +02:00
Harminder VirkandGitHub 69e2a6d695 Feat/plugin develop (#10926)
Fixes: FRMW-2865

In this PR we add support for developing a plugin in watch mode. During the file change, we re-compile the source code (incrementally), publishes the package, and updates the installations of the plugin. 

We are using `yalc` under the hood and it must be installed as a dev dependency in the plugin project and the main Medusa app.
2025-01-13 13:08:02 +00:00
Rahul R.andGitHub ecf73780e0 [Fix] Update Repository Directory Paths for All Packages (#10910)
This PR updates the `repository.directory` field in the `package.json` files for packages located within the `modules` folder.
2025-01-13 12:49:50 +01:00
Shahed NasserandGitHub 2a9ca1d1e1 docs: fixes to workflow reference tooling (#10931) 2025-01-13 13:35:04 +02:00
Kasper Fabricius KristensenandGitHub 1ba2fadf22 feat(admin-bundler,admin-vite-plugin,medusa): Add support for loading Admin Extensions from plugins (#10869)
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
2025-01-13 10:45:33 +00:00
Shahed NasserandGitHub 253b642418 docs: fix validation in restaurant-delivery marketplace recipe (#10925) 2025-01-13 11:24:21 +02:00
Shahed NasserandGitHub db338e4b5a chore(core-flows,types): add tsdocs for create cart workflow (#10928) 2025-01-13 11:23:58 +02:00
b938051c9b docs: update breaking changes for google auth storefront (#10924)
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>
2025-01-13 08:43:16 +00:00
Kasper Fabricius KristensenandGitHub bc22b81cdf feat(inventory,dashboard,types,core-flows,js-sdk,medusa): Improve inventory UX (#10630)
* feat(dashboard): Add UI for bulk editing inventory stock (#10556)

* progress

* cleanup types

* add changeset

* fix 0 values

* format schema

* add delete event and allow copy/pasting enabled for some fields

* add response types

* add tests

* work on fixing setValue behaviour

* cleanup toggle logic

* add loading state

* format schema

* add support for bidirectional actions in DataGrid and update Checkbox and RadioGroup

* update lock

* lint

* fix 404

* address feedback

* update cursor on bidirectional select
2025-01-12 19:07:14 -05:00
Shahed NasserandGitHub c5915451b8 docs-util: add examples generator for workflows and steps (#10914)
* initial changes

* docs-util: generate examples for workflows and steps
2025-01-10 19:16:43 +02:00
Shahed NasserandGitHub e82645ba55 docs: typo fixes in execute workflow section (#10911) 2025-01-10 18:20:13 +02:00
Carlos R. L. RodriguesandGitHub 01acf9e700 fix(orchestration): avoid retry when finished (#10913) 2025-01-10 13:12:08 -03:00
Shahed NasserandGitHub a126f40bbe docs: DX improvements to a workflow / step reference page (#10906) 2025-01-10 13:47:08 +02:00
Harminder VirkandGitHub 428fce5313 chore: move build utilities to Compiler class (#10904)
Fixes: FRMW-2866
2025-01-10 11:30:48 +00:00
c1930bd656 feat: Merge plugin modules (#10895)
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](https://github.com/medusajs/medusa/pull/10895/commits/6dd164f783d632c927e0a48c50090dcf7387ccdd))

Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
2025-01-10 10:02:09 +00:00
Shahed NasserandGitHub a607b8e800 docs-util: fix hook input type showing as __type (#10905) 2025-01-10 10:25:17 +02:00
Shahed NasserandGitHub ff725090bb fix(types): add missing inventory_items to input of createProductsWorkflow (#10892)
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.
2025-01-10 01:23:29 +00:00
Adrien de PerettiandGitHub c490e08142 fix(modules): Fix miss leading provider resolution error (#10900)
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.
2025-01-10 01:16:33 +00:00
Shahed NasserandGitHub 44706ef03b docs: add workflow and js sdk reference pages for commerce modules (#10898)
* docs: add workflow and js sdk reference pages for commerce modules

* resolve build errors
2025-01-09 18:19:40 +02:00
Riqwan ThamirandGitHub 3fec01ab49 fix(pricing): add null conditions for deleted at during price calculations (#10896) 2025-01-09 15:32:57 +01:00
6747a1564b fix: event-bus-redis processor execute event before subscriber are loaded (#10823)
* fix(worker): run worker after application start

* test(event-bus-redis): worker should initiate with autorun:false

---------

Co-authored-by: Suki Wang <suki.wang@shoplineapp.com>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-01-09 14:32:15 +01:00
gharbi-mohamed-devandGitHub 635d026f7f docs: fix typo (#10894) 2025-01-09 14:05:33 +02:00
Shahed NasserandGitHub 1ade80c375 docs: fix colon in api key header (#10893) 2025-01-09 13:38:24 +02:00
Kasper Fabricius KristensenandGitHub a625bce7b0 fix(pricing): PriceLists of type Sale should not override lower prices (#10882)
Resolves CMRC-840
2025-01-09 10:07:15 +00:00
Shahed NasserandGitHub 3ee15f3b85 docs: add inventory kit conceptual guide (#10891) 2025-01-09 11:59:52 +02:00
Harminder VirkandGitHub 28febfc643 feat: remove dead code and refactor the logic of resolving plugins (#10874) 2025-01-09 14:52:10 +05:30
Harminder VirkandGitHub 67782350a9 feat: add default retry strategy for redis (#10880)
Fixes: FRMW-2861
2025-01-09 05:26:08 +00:00
Shahed NasserandGitHub bd73716bb6 docs-util: add warning on request body change (#10881) 2025-01-08 21:40:46 +02:00
Shahed NasserandGitHub 46f987e351 docs-util: fix parsing when function if it has three parameters (#10878)
* docs-util: fix parsing when step when it has three parameters

* fix condition
2025-01-08 16:48:20 +02:00
Shahed NasserandGitHub a0e944a7a8 docs: general fixes and additions (#10876) 2025-01-08 16:09:48 +02:00
Shahed NasserandGitHub 9427f1e4af docs: added llms.txt (#10873) 2025-01-08 12:27:55 +02:00
gharbi-mohamed-devandGitHub ef78a04263 docs: fix typo (#10870) 2025-01-08 08:07:43 +00:00
2734dd6f20 docs: added Cloudflare R2 guide for Object Storage (#10497)
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
2025-01-08 08:06:50 +00:00
Shahed NasserandGitHub 8e7d895aa2 docs: update recipes following 2.2 release (#10868) 2025-01-07 17:07:51 +02:00
Shahed NasserandGitHub 60fd1cbc6c docs: document dependencies for auth provider (#10865)
* docs: document dependencies for auth provider

* fixes

* document overriding callback url
2025-01-07 16:42:45 +02:00
Shahed NasserandGitHub edcff0ed16 docs-util: fixes to OAS generator + generate OAS (#10867) 2025-01-07 16:35:55 +02:00
899b1fba4a chore(medusa): Add handler path to the http tracing to be able to group by (#10835)
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>
2025-01-07 13:16:20 +00:00
5216ad2f15 chore(docs): Generated References (automated) (#10866)
Generated the following references:
- `auth`
- `auth_provider`
- `core_flows`
- `fulfillment`
- `fulfillment_provider`
- `js_sdk`
- `medusa`
- `modules`
- `modules_sdk`
- `order`
- `payment`
- `stock_location_next`
- `stock_location_next_models`
- `types`
- `utils`

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-01-07 13:14:10 +00:00
Shahed NasserandGitHub ff3df907ce docs: document create-medusa-app new project name argument (#10834) 2025-01-07 15:02:55 +02:00
Shahed NasserandGitHub 936954e0b4 docs: fix divider in API reference + clean up layout (#10861)
* docs: fix divider in API reference + clean up layout

* fix build error
2025-01-07 14:59:39 +02:00
54a3db79a1 chore(docs): Update version in documentation (automated) (#10864)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2025-01-07 14:58:44 +02:00
Shahed NasserandGitHub 38223e5104 docs: rename remoteLink and remoteQueryConfig (#10836)
* docs: rename remoteLink and remoteQueryConfig

* change version number
2025-01-07 14:43:12 +02:00