Commit Graph

6792 Commits

Author SHA1 Message Date
Carlos R. L. Rodrigues
e9a06f4b4d fea(providers): locking postgres (#9545)
Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
2024-10-17 13:11:39 +00:00
Riqwan Thamir
3b50c6d019 feat(core-flows,types,medusa): Add tax region update API (#9634)
* feat(core-flows,types,medusa): Add tax region update API

* chore: added specs
2024-10-17 14:19:29 +02:00
Frane Polić
2cba362537 fix(dashboard): cleanup Payments section (#9520)
**What**
- fix content breaking
- use a shorter payment ID in the UI

---

FIXES CC-572
2024-10-17 11:36:02 +00:00
Kasper Fabricius Kristensen
1d540af783 feat(dashboard): Submit forms on Cmd + Enter (#9623)
**What**
- Changes all forms to only submit on Cmd/Ctrl + Enter instead of just Enter.
- Cleans up the position of submit/cancel buttons in many FocusModals that still had them in the header.
- Fixes responsiveness of multiple forms
- Removes the SplitView component, and replaces its usages with StackedDrawer/Modal to align the UX across the project.

Resolves CC-103, CC-535
2024-10-17 09:38:12 +00:00
Oli Juhl
0be50059f2 fix: Add free text search on reservations (#9621) 2024-10-17 10:21:24 +02:00
Oli Juhl
df78f6e871 chore: Prepare changeset for 2.0 release (#9631) 2024-10-17 09:37:37 +02:00
Kasper Fabricius Kristensen
6a6fd6ee4c fix(dashboard,ui): Fix outline flash on FocusModal (#9624)
**What**
- Fixes an issue where the `outline` would flash on FocusModals when the focus was transferred to the modal.
- Fixes an issue where the selected value of the combobox component was misaligned for single value comboboxes.

Resolves CC-604
2024-10-17 06:56:08 +00:00
Frane Polić
06536e7655 fix(product): options validation if ids are same (#9622)
**What**
- fix validation of existing variant with options on update if the ids are same

---

FIXES CC-60
CLOSES https://github.com/medusajs/medusa/issues/9620
2024-10-17 06:55:16 +00:00
erickirt
89b9fd24b2 Switch the headings to match the content (#9619)
HEading and content was switched for payment and file modules
2024-10-17 06:49:17 +00:00
Carlos R. L. Rodrigues
f7fbc2f97c feat(core-flows): cart events (#9585) 2024-10-16 14:27:24 -03:00
Carlos R. L. Rodrigues
6a6c193042 chore(medusa): default endpoints size limit (#9616) 2024-10-16 14:27:01 -03:00
Adrien de Peretti
e911c6aebf fix(modules-sdk): Add missing paths to require.resolve in load resources (#9608)
FIXES FRMW-2747

**What**

Add missing `paths` options
2024-10-16 17:20:56 +00:00
Harminder Virk
68560787e5 breaking: rename package names to be consistent and under @medusajs scope (#9580) 2024-10-16 22:28:09 +05:30
Adrien de Peretti
cc1a25abb2 fix(utils): Mikro orm joined selection issue when select-in strategy (#9615)
* fix(utils): Mikro orm joined selection issue when select-in strategy

* fix types

---------

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2024-10-16 17:43:18 +02:00
Frane Polić
c2a39c78f5 fix(dashboard): FF return reason table (#9614)
**What**
- fix an issue with text display in the table
- fix label

---

FIXES CC-603
2024-10-16 14:24:35 +00:00
Riqwan Thamir
449168578d fix(dashboard): Set correct method value on promotion (#9610)
<img width="1441" alt="Screenshot 2024-10-16 at 14 17 05" src="https://github.com/user-attachments/assets/7a2e2196-5ca6-4532-9bf0-a4b693c6babc">

RESOLVES CC-601
2024-10-16 12:31:39 +00:00
Shahed Nasser
ea5bff9034 docs: update providers to use ModuleProvider (#9579)
Document change introduced by #9544

> Note: fine to merge now as it requires generating references, which will only happen after the next release.
2024-10-16 11:37:14 +00:00
Shahed Nasser
3610d58f49 docs: fix heroku typo (#9382)
Closes #9356
2024-10-16 10:44:50 +00:00
Shahed Nasser
eed88c95ec docs: improved commerce modules [5/5] (#9592)
- Improve remaining commerce modules
- Other: add a note about using methods of the modules' main services.
2024-10-16 10:25:21 +00:00
Shahed Nasser
6e856d3156 docs: added examples page (#9587)
- Added an examples page with examples of all different concepts in Medusa. We'll probably add more examples with time as we see the need for them.
- Small fixes in different pages.

Preview: https://resources-docs-ocb5uyp0o-medusajs.vercel.app/v2/resources/examples
2024-10-16 10:07:39 +00:00
Shahed Nasser
ddcb749bc4 docs: added documentation for build command (#9604)
- Added documentation for `medusa build` command
- Update deployment documentation for admin to use `--admin-only` option
2024-10-16 09:37:40 +00:00
Shahed Nasser
f6d3453e6d docs: improved commerce modules [4/n] (#9517)
Improve pricing, product, and promotion modules docs

[4/n]
2024-10-16 09:34:36 +00:00
Carlos R. L. Rodrigues
eb364834de fix(types): logger (#9581) 2024-10-16 06:29:49 -03:00
Shahed Nasser
2b77bd85a6 docs-util: fixes for OAS docs generator + framework typedoc config (#9603)
* fix order replaced in OAS response + framework tsdoc config

* fix for some types
2024-10-16 12:17:28 +03:00
Shahed Nasser
714b9e6c98 docs: update resolve path to use src (#9605)
Update path used in `resolve` of modules to start with `src`
2024-10-16 09:10:30 +00:00
Harminder Virk
20428dac71 fix: resolve provider path before requiring it (#9601) 2024-10-16 14:17:55 +05:30
Kasper Fabricius Kristensen
3388764af4 fix(admin-vite-plugin): Replace slashes for Windows (#9602) 2024-10-16 08:39:07 +00:00
Shahed Nasser
6efb5897dc docs: fix package names in module registration (#9590)
* docs: fix package names in module registration

* update references
2024-10-16 09:05:07 +02:00
Kasper Fabricius Kristensen
813efeae51 fix(admin-vite-plugin): Normalize file paths and add tests (#9595)
**What**
- #9338 had a regression which caused the import path in some virtual modules to be invalid on Windows.
- This PR fixes the issue so we now again create the correct import paths, and adds tests to prevent this from slipping in again.
2024-10-15 16:48:56 +00:00
Adrien de Peretti
84fa6ccde5 chore: Update admin build/serve configuration (#9584)
**Breaking changes**

The `outDir` has been deprecated and wont be used anymore, instead all the path are computed internally following these rules
- if admin is not `disabled` and the `build` command is run without the `--admin-only` flag, then the admin output dir will be `.medusa/server/public/admin` and it will be served from that same location from the medusa instance.
- if admin is not `disabled` and the `build` command is run with the `--admin-only` flag, then the admin output dir will be `.medusa/admin` with the purpose of deploying the admin separately. ⚠️ (expect to receive a warning log)
- if the admin is `disabled` and the `build` command is run with the `--admin-only` flag, then fallback to rule number 2

| admin enabled  | medusa build --admin-only  | output dir |
|---|---|---|
| true  | true  | `.medusa/admin` ⚠️ (expect to receive a warning log) |
| true  | false  | `.medusa/server/public/admin`  |
| false  | true  | `.medusa/admin`  |
| false  | false  | none |

```diff
// medusa-config.ts

{
  // ...
  admin: {
-    outDir: 'some/path'
  }
}
```


cc @kasperkristensen @sradevski @olivermrbl
2024-10-15 15:59:47 +00:00
Carlos R. L. Rodrigues
4a03bdbb86 feat(providers): locking redis (#9544) 2024-10-15 12:40:24 -03:00
Adrien de Peretti
e77a2ff032 fix(utils): Reversed module package missing references (#9589)
**What**
When resolving the modules through an array, if the module does not have a joiner config to rely on (not `queryable`, not using the `Module` util), then the key should be provided to register the module in the container. Eventually, the module author should provide that key to be used.

The only exception is for the medusa modules where we have a map that allows us to resolve that key automatically from the path of the resolve value
2024-10-15 15:28:45 +00:00
Adrien de Peretti
e9383f25e0 fix(utils): update medusa config resolution for consistency (#9591) 2024-10-15 11:52:06 -03:00
Riqwan Thamir
537567b679 chore: add compare_at_unit_price when price list price is retrieved (#9564)
* chore: add compare_at_unit_price when price list price is retrieved

* chore: add test for update item + more fixes along the way

* chore: fix tests

* chore: add refresh spec

* Apply suggestions from code review

Co-authored-by: Adrien de Peretti <adrien.deperetti@gmail.com>

* chore: use undefined checker

* chore: switch to map

---------

Co-authored-by: Adrien de Peretti <adrien.deperetti@gmail.com>
2024-10-15 13:05:14 +02:00
Adrien de Peretti
827b32cffd chore: Remove Query Filter (#9403)
**What**
Cleanup old QueryFilter
2024-10-15 10:41:53 +00:00
Frane Polić
48cc00e991 feat(core-flows, product): options checks on product create/update (#9171)
**What**
- validate that variants are unique with respect to options on product update/create and variant update/create
- validate that the product has options upon creation
- ensure variants have the same number of option values as the product has options
- admin error handling
- update tests

---

FIXES FRMW-2707 CC-556
2024-10-15 09:06:51 +00:00
Riqwan Thamir
20d19c1d67 chore: update slack message (#9290) 2024-10-15 07:47:13 +00:00
Frane Polić
75475f7b28 fix(dashboard): reservation inventory details (#9535)
**What**
- display data in inventory details section of the reservation details page

---

FIXES CC-595
2024-10-14 17:59:52 +00:00
github-actions[bot]
f2d662efca chore(docs): Generated References (automated) (#9567)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2024-10-14 19:59:14 +02:00
Harminder Virk
f8e8b276bd fix: remove default value for the cluster flag (#9570)
Defining the default value applies the flag automatically and hence activates the cluster mode.
2024-10-14 16:54:13 +00:00
Frane Polić
809c851865 fix(core-flows, link-module): product <> inventory delete cascades (#9528)
**What**
- remove cascade delete of inventory items on product delete
- implement inventory deletion in product/variant delete workflows with checks:
  - product/variant cannot be deleted if there are reservations associated with their inventory items
  - inventory item will be cascade deleted if it's not used by other variants (that are not being deleted in the current flow)

---

FIXES CC-581 CC-582
2024-10-14 16:22:31 +00:00
Shahed Nasser
86f744cf3b fix(create-medusa-app): use db:migrate to run migrations (#9565) 2024-10-14 15:54:05 +00:00
Kasper Fabricius Kristensen
ebb16d6020 fix(dashboard): Translate breadcrumbs (#9561)
**What**
- Adds translated keys for all static breadcrumbs.
2024-10-14 14:42:59 +00:00
Harminder Virk
ad322f2760 breaking: remove deprecated commands and code (#9521)
* breaking: remove deprecated commands

* feat: remove deprecated code and usages

* refactor: remove more logic around default relations

* fix tests

* remove log

* fix: remove defaultFields usage

* fix: add back accidentally removed code

* refactor: implement feedback

* feat: add --cluster flag to the start command

* refactor: assign limit to defaultLimit property

* fix: breaking code because of removed check

---------

Co-authored-by: adrien2p <adrien.deperetti@gmail.com>
2024-10-14 20:11:34 +05:30
Adrien de Peretti
cea4cdc8d7 fix: Link migration descriptor case changes and hash computation (#9560)
**What**
The module service name case has changed and the hash generation was performed on the non lower cased version of it while after the hash generation everything is based on the lower case version of the generated table name form the service names leading to different hash computation. This pr update the link migration table to adjust the to/from module value with its new value as well as generating the hash from the lower case version of the computed table name

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2024-10-14 14:32:50 +00:00
Kasper Fabricius Kristensen
170b3a08b7 fix(dashboard): Prevent category names from overflowing in organize section (#9562)
**What**
- Prevents the name of parent and children categories from overflowing in the Organize section.

Resolves CC-586
2024-10-14 14:24:22 +00:00
Kasper Fabricius Kristensen
56135b9750 fix(dashboard): Change icon of Shipping Profiles card (#9563)
Resolves CC-156
2024-10-14 14:23:07 +00:00
Adrien de Peretti
d8b7f90689 chore(product): Update the events emitted from the product module (#9557) 2024-10-14 09:19:32 -03:00
github-actions[bot]
b40fa6353e chore(docs): Updated API Reference (v2) (#9552)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
2024-10-14 11:00:04 +00:00
Oli Juhl
43324b9294 fix: Add shipping method data validation (#9542)
* fix: Add shipping method data validation

* fix: return type
2024-10-14 12:55:01 +02:00