Stevche Radevski
a461e21ae7
fix: Get backend URL from environment variable if available ( #9450 )
2024-10-03 11:50:28 +00:00
Harminder Virk
48e00169d2
breaking: move shared HTTP utils to the framework ( #9402 )
...
Fixes: FRMW-2728, FRMW-2729
After this PR gets merged the following middleware will be exported from the `@medusajs/framework/http` import path.
- applyParamsAsFilters
- clearFiltersByKey
- applyDefaultFilters
- setContext
- getQueryConfig
- httpCompression
- maybeApplyLinkFilter
- refetchEntities
- unlessPath
- validateBody
- validateQuery
Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com >
2024-10-03 09:42:00 +00:00
Harminder Virk
a578313db9
feature: bundle all modules ( #9324 )
2024-09-30 09:04:03 +02:00
Adrien de Peretti
358435d715
chore: Move graphl to a single place ( #9303 )
...
* chore: Move graphl to a single place
* add new line
2024-09-25 12:04:25 +02:00
Harminder Virk
9e711720dd
chore: upgrade moduleResolution to Node16 ( #9269 )
2024-09-24 17:19:20 +05:30
Harminder Virk
97e003ef4f
chore: Cleanup utils package ( #9238 )
...
Fixes: FRMW-2712
Old PR: https://github.com/medusajs/medusa/pull/9234 Closed because of incorrect branch naming
Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com >
2024-09-23 10:37:58 +00:00
Carlos R. L. Rodrigues
1215a7c094
chore(orchestrator): remote joiner using entitymap ( #9205 )
2024-09-20 05:30:08 -03:00
Adrien de Peretti
58167b5dfa
feat(index): Index module foundation ( #9095 )
...
**What**
Index module foundation
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com >
2024-09-18 19:04:04 +00:00
Carlos R. L. Rodrigues
950cf9af79
chore: remove container registration name ( #9137 )
2024-09-16 06:22:24 -03:00
McTom234
5651e890dc
fix: instanceof MedusaError does not work ( #9094 )
...
* fix(error): add custom name
* revert: remove changeset
as requested https://github.com/medusajs/medusa/pull/9094#discussion_r1753971768
* refactor(error): use object identifier to check error type
2024-09-11 17:21:44 +02:00
Harminder Virk
32ebfa619f
feature: introduce types for query.graph method ( #9031 )
2024-09-09 13:26:40 +05:30
Adrien de Peretti
2c5e72d141
feat: Application types generation from project GQL schema's ( #8995 )
2024-09-06 15:15:32 +05:30
Harminder Virk
9b6c2e5efa
fix: ignore metadata when computing relationships from payload ( #8895 )
2024-08-30 13:32:25 +05:30
Harminder Virk
7c2cfc132a
feature: add db:create command ( #8760 )
2024-08-26 15:04:52 +05:30
Harminder Virk
9a508056f6
feat: add env editor utility to edit update .env files ( #8741 )
2024-08-25 19:31:56 +05:30
Carlos R. L. Rodrigues
058378970a
chore: dependecies reorg ( #8535 )
2024-08-23 07:16:04 -03:00
Shahed Nasser
bc74e381ad
feat(utils): use dotenv-expand to allow variables within env ( #8720 )
2024-08-22 13:51:36 +03:00
Stevche Radevski
a013c4edc5
feat: Move userpass default definition to defineConfig instead of a hard-coded value ( #8557 )
2024-08-13 11:10:23 +02:00
Stevche Radevski
4af82aab32
fix: Use local notification provider for feed channel by default ( #8518 )
2024-08-08 18:22:50 +02:00
Carlos R. L. Rodrigues
c017be2a54
chore(utils): improve to handle util ( #8487 )
2024-08-07 11:33:19 -03:00
Shahed Nasser
98f42e8995
feat(create-medusa-app, medusa): check Node.js version before installation. ( #8452 )
...
Check before installation with `create-medusa-app` and `medusa new` whether the current node version is >= 20. If not, exit with an error.
2024-08-06 07:15:17 +00:00
Adrien de Peretti
9b6de8c02d
chore(framework): Move feature flags related resources and cleanup ( #8297 )
...
**What**
cleanup and move the feature flag related resources to manage them.
It also include some refactoring around loading and registering the flag as well as not relying on the `glob` package anymore plus some reorganization of the code itself
FIXES FRMW-2625
2024-07-30 12:20:03 +00:00
Adrien de Peretti
47dde05517
chore(framework): Initial commit ( #8221 )
...
**What**
- Initiate the framework package (which is just a place to move things around for now)
- move the config loader and related resources as well as the `ConfigModule` type
- Create a ConfigManager singleton which prepare and store the config (later can be stored entirely in the container) and allow for easier test override
- re export the logger from the framework
- replace medusa config loader with the framework one
- `build` run type check on tests as well but `prepublishOnly` will not fail on build if tests are typed broken
FIXES FRMW-2607
FIXES FRMW-2609
FIXES FRMW-2614
FIXES FRMW-2618
2024-07-23 15:46:28 +00:00
Harminder Virk
45c573b03a
Feat: Improvements to the migrations CLI and workflow ( #8060 )
2024-07-11 16:52:34 +05:30
Carlos R. L. Rodrigues
f460348280
fix(utils): define link alias + pluralize ( #8070 )
...
What:
* Fix alias of models that have "compound names": eg "related_product"
* `deleteCascade` option
* Package to pluralize english words correctly
2024-07-10 22:37:14 +00:00
Adrien de Peretti
fc7f5ff71a
fix: Modules providers loading mechanism to infer the source dir ( #8015 )
...
* fix: Modules providers loading mechanism to infer the source dir
* finalize
2024-07-08 14:11:45 +02:00
Adrien de Peretti
1393f51046
fix: Improve get caller file path util ( #7974 )
...
* fix: Improve get caller file path util
* improve compatibility
* update comment
---------
Co-authored-by: Riqwan Thamir <rmthamir@gmail.com >
2024-07-05 12:54:27 +02:00
Adrien de Peretti
41c4307fc7
feat: define link util ( #7931 )
...
* feat: define link util
* handle pluralized fieldAlias for isList
* serviceName ar reference
* finalize
* todo
* WIP
* finalize
* fix tests
* update typings
* fix Module
* linkable
* update errors
2024-07-04 10:37:30 +02:00
Stevche Radevski
012a624ee4
feat: Flatten the provider config for all modules ( #7930 )
2024-07-03 16:57:12 +02:00
Adrien de Peretti
617a5972bf
feat: refactor module joiner config and links generation ( #7859 )
...
* feat: refactor module joiner config and links generation
* improve typings
* WIP
* WIP
* WIP
* rename type file
* create link config
* finish typings and add utils
* improve links
* WIP typings
* finalize ExportModule utils
* finalize ExportModule utils
* fix: dml tests
* improve and fixes
* simplify typings with id changes
* add toJSON
* multiple fixes and entity builder fixes
* fix currency searchable
* fix tests
* medusa service refactoring
* cleanup
* cleanup and fixes
* make module name optional
* renaming
---------
Co-authored-by: Harminder Virk <virk.officials@gmail.com >
2024-07-03 13:12:49 +02:00
Riqwan Thamir
3f16b011fa
feat(utils,types): DML Index can generate where SQL from a query builder ( #7849 )
...
what:
- introduces a simple query builder
- uses the query builder to tranform an object in where to SQL when applying indexes
```
Examples:
{ where: { column: null } } -> column IS NULL
{ where: { column: { $ne: null } } } -> column IS NOT NULL
{ where: { boolean_column: true } } -> boolean_column IS TRUE
{ where: { column: "value", another_column: { $ne: 30 } } } -> column = "value" AND another_column != 30
```
```
const user = model
.define("user", {
email: model.text(),
account: model.text(),
organization: model.text(),
})
.indexes([
{
on: ["organization", "account"],
where: { email: { $ne: null } },
},
{
name: "IDX-email-account-special",
on: ["organization", "account"],
where: {
email: { $ne: null },
account: null,
},
},
```
RESOLVES CORE-2392
2024-06-27 10:24:34 +00:00
Adrien de Peretti
34c44078e7
fix: DML relation management for many to one relation ship foreign keys ( #7790 )
...
FIXES CORE-2369
cc @thetutlage
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com >
2024-06-24 18:54:54 +00:00
Shahed Nasser
79d90fadc4
feat(utils): configure notification module by default ( #7814 )
...
Add the notification module to `defineConfig` and configure the local notification module.
2024-06-24 14:47:40 +00:00
Adrien de Peretti
48963f55ef
Chore/rm main entity concept ( #7709 )
...
**What**
Update the `MedusaService` class, factory and types to remove the concept of main modules. The idea being that all method will be explicitly named and suffixes to represent the object you are trying to manipulate.
This pr also includes various fixes in different modules
Co-authored-by: Stevche Radevski <4820812+sradevski@users.noreply.github.com >
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com >
2024-06-19 13:02:16 +00:00
Harminder Virk
fd87858bd9
Handle embedded pg schema name inside the table name when generating indexes ( #7774 )
2024-06-19 16:48:44 +05:30
Carlos R. L. Rodrigues
cfa983001b
feat(order): create claim and exchange ( #7734 )
2024-06-18 08:08:16 -03:00
Sebastian Rindom
e66cf9112d
fix(utils): support omitting modules in config ( #7563 )
...
* fix: skip module loading if mod: false
* fix: don't include disabled modules in config
* add test
* fix: revert changes to module loading in medusaapp
2024-05-31 15:28:52 +02:00
Harminder Virk
11528526fa
feat: loosely typed container
2024-05-31 15:22:03 +05:30
Harminder Virk
a40b6aef6d
Add defineConfig helper ( #7517 )
2024-05-29 17:10:15 +05:30
Carlos R. L. Rodrigues
f1ced57d5f
chore: payment auto capture + remove enum from utils ( #7513 )
...
What:
- handles payments session that are auto captured
- removes all the enums from `@medusajs/types`
- move all `@medusajs/types` to devDependencies
2024-05-29 11:12:59 +00:00
Harminder Virk
ef6d748784
feat: add Filesystem util and load env util ( #7487 )
2024-05-28 15:31:13 +05:30
Riqwan Thamir
7baedf73d5
feat(core-flows,types,utils,medusa): Update existing line items when adding the same variant to cart ( #7470 )
...
* feat(core-flows,types,utils,medusa): Update existing line items when adding the same variant to cart
* chore: split steps into 2 for add-to-cart
* chore: split steps into 2 for add-to-cart
* chore: iterate safely
* chore: parallelize upsert
2024-05-27 17:54:11 +02:00
Adrien de Peretti
b8bc3ed16f
chore: Start cleaning up medusa-core-utils ( #7450 )
...
**What**
- remove medusa-core-utils
- dispatch the utils where they belongs
- update usage
**NOTE**
I have been wondering if the graceful class should go into the utils package or medusa package, I ve put it in the medusa package as it seems to be the best place I can see for now and is tight to the server as well. Also, I wanted to avoid the utils package to depends on http and net dependencies, happy to change that if you feel like it
2024-05-27 08:00:15 +00:00
Stevche Radevski
5ede560f70
feat(auth): Revamp authentication setup ( #7387 )
...
* chore: Clean up authentication middlewares
* chore: Rename AuthUser to AuthIdentity
* feat: Define link between user, customer, and auth identity
* feat: Use links for auth, update auth context content
* fix: Adjust user create command with new auth setup
* fix: Make auth login more dynamic, review fixes
* fix: Change test assertions for created by
2024-05-22 10:27:32 +02:00
Harminder Virk
17486cda99
Validate product and collection handles to be URL safe ( #7310 )
...
* fix: allow URL safe characters for product handle
Fixes: CORE-2072
2024-05-15 17:50:26 +02:00
Harminder Virk
a502222582
refactor: remove usage of inventory_quantity from the codebase ( #7323 )
2024-05-14 13:01:49 +02:00
Riqwan Thamir
0430e63b0b
feat(core-flows,typers,utils,medusa): add payment auth step to complete cart workflow - [complete cart part 3] ( #7248 )
...
* chore: authorize payment sessions for cart
* chore: add spec for cart returns
* fix: Correctly select fields for cart
* chore: fix specs + address comments
---------
Co-authored-by: Stevche Radevski <sradevski@live.com >
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com >
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com >
Co-authored-by: Carlos R. L. Rodrigues <rodrigolr@gmail.com >
2024-05-06 23:34:56 +02:00
Carlos R. L. Rodrigues
5228b14ca9
feat(medusa): complete cart create reservation ( #7250 )
2024-05-06 14:36:55 -03:00
Adrien de Peretti
bbccd6481d
chore(): start moving some packages to the core directory ( #7215 )
2024-05-03 13:37:41 +02:00