chore(): Move peer deps into a single package and re export from framework (#13439)
* chore(): Move peer deps into a single package and re export from framework * WIP * update core packages * update cli and deps * update medusa * update exports path * remove analyze * update modules deps * finalise changes * fix yarn * fix import * Refactor peer dependencies into a single package Consolidate peer dependencies into one package and re-export from the framework. * update changeset * Update .changeset/brown-cows-sleep.md Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com> * rm deps * fix deps * increase timeout * upgrade version * update versions * update versions * fixes * update lock * fix missing import * fix missing import --------- Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
1 parent
55f89b2151
commit
12a96a7c70
349 files changed
+641
-1062
No files matched your search
@@ -0,0 +1,48 @@
|
|||||||
|
---
|
||||||
|
"@medusajs/cli": patch
|
||||||
|
"@medusajs/core-flows": patch
|
||||||
|
"@medusajs/framework": patch
|
||||||
|
"@medusajs/modules-sdk": patch
|
||||||
|
"@medusajs/orchestration": patch
|
||||||
|
"@medusajs/types": patch
|
||||||
|
"@medusajs/utils": patch
|
||||||
|
"@medusajs/workflows-sdk": patch
|
||||||
|
"create-medusa-app": patch
|
||||||
|
"@medusajs/medusa": patch
|
||||||
|
"@medusajs/test-utils": patch
|
||||||
|
"@medusajs/analytics": patch
|
||||||
|
"@medusajs/api-key": patch
|
||||||
|
"@medusajs/auth": patch
|
||||||
|
"@medusajs/cache-redis": patch
|
||||||
|
"@medusajs/cart": patch
|
||||||
|
"@medusajs/currency": patch
|
||||||
|
"@medusajs/customer": patch
|
||||||
|
"@medusajs/event-bus-redis": patch
|
||||||
|
"@medusajs/file": patch
|
||||||
|
"@medusajs/fulfillment": patch
|
||||||
|
"@medusajs/index": patch
|
||||||
|
"@medusajs/inventory": patch
|
||||||
|
"@medusajs/link-modules": patch
|
||||||
|
"@medusajs/locking": patch
|
||||||
|
"@medusajs/notification": patch
|
||||||
|
"@medusajs/order": patch
|
||||||
|
"@medusajs/payment": patch
|
||||||
|
"@medusajs/pricing": patch
|
||||||
|
"@medusajs/product": patch
|
||||||
|
"@medusajs/promotion": patch
|
||||||
|
"@medusajs/locking-postgres": patch
|
||||||
|
"@medusajs/payment-stripe": patch
|
||||||
|
"@medusajs/region": patch
|
||||||
|
"@medusajs/sales-channel": patch
|
||||||
|
"@medusajs/settings": patch
|
||||||
|
"@medusajs/stock-location": patch
|
||||||
|
"@medusajs/store": patch
|
||||||
|
"@medusajs/tax": patch
|
||||||
|
"@medusajs/user": patch
|
||||||
|
"@medusajs/workflow-engine-inmemory": patch
|
||||||
|
"@medusajs/workflow-engine-redis": patch
|
||||||
|
"@medusajs/draft-order": patch
|
||||||
|
"@medusajs/deps": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
chore(): Move peer deps into a single package and re export from framework
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
import { FeatureFlag, defineFileConfig } from "@medusajs/framework/utils"
|
import { FeatureFlag, defineFileConfig } from "@medusajs/framework/utils"
|
||||||
import { Migration } from "@mikro-orm/migrations"
|
import { Migration } from "@medusajs/framework/mikro-orm/migrations"
|
||||||
|
|
||||||
defineFileConfig({
|
defineFileConfig({
|
||||||
isDisabled: () => !FeatureFlag.isFeatureEnabled("custom_ff"),
|
isDisabled: () => !FeatureFlag.isFeatureEnabled("custom_ff"),
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
"@medusajs/core-flows": "workspace:*",
|
"@medusajs/core-flows": "workspace:*",
|
||||||
"@medusajs/customer": "workspace:^",
|
"@medusajs/customer": "workspace:^",
|
||||||
"@medusajs/event-bus-local": "workspace:*",
|
"@medusajs/event-bus-local": "workspace:*",
|
||||||
|
"@medusajs/framework": "workspace:*",
|
||||||
"@medusajs/fulfillment": "workspace:^",
|
"@medusajs/fulfillment": "workspace:^",
|
||||||
"@medusajs/fulfillment-manual": "workspace:^",
|
"@medusajs/fulfillment-manual": "workspace:^",
|
||||||
"@medusajs/inventory": "workspace:^",
|
"@medusajs/inventory": "workspace:^",
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { Migration } from '@mikro-orm/migrations';
|
import { Migration } from "@medusajs/framework/mikro-orm/migrations";
|
||||||
|
|
||||||
export class Migration20240907134741 extends Migration {
|
export class Migration20240907134741 extends Migration {
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
"@medusajs/currency": "workspace:^",
|
"@medusajs/currency": "workspace:^",
|
||||||
"@medusajs/customer": "workspace:^",
|
"@medusajs/customer": "workspace:^",
|
||||||
"@medusajs/event-bus-local": "workspace:*",
|
"@medusajs/event-bus-local": "workspace:*",
|
||||||
"@medusajs/framework": "workspace:^",
|
"@medusajs/framework": "workspace:*",
|
||||||
"@medusajs/fulfillment": "workspace:^",
|
"@medusajs/fulfillment": "workspace:^",
|
||||||
"@medusajs/fulfillment-manual": "workspace:^",
|
"@medusajs/fulfillment-manual": "workspace:^",
|
||||||
"@medusajs/inventory": "workspace:^",
|
"@medusajs/inventory": "workspace:^",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Migration } from "@mikro-orm/migrations"
|
import { Migration } from "@medusajs/framework/mikro-orm/migrations"
|
||||||
|
|
||||||
export class Migration20250805184935 extends Migration {
|
export class Migration20250805184935 extends Migration {
|
||||||
override async up(): Promise<void> {
|
override async up(): Promise<void> {
|
||||||
|
|||||||
@@ -21,10 +21,6 @@
|
|||||||
"scrypt-kdf": "^2.0.1",
|
"scrypt-kdf": "^2.0.1",
|
||||||
"jsonwebtoken": "^9.0.2",
|
"jsonwebtoken": "^9.0.2",
|
||||||
"@medusajs/framework": "^1.0.1",
|
"@medusajs/framework": "^1.0.1",
|
||||||
"@mikro-orm/core": "6.4.3",
|
|
||||||
"@mikro-orm/knex": "6.4.3",
|
|
||||||
"@mikro-orm/migrations": "6.4.3",
|
|
||||||
"@mikro-orm/postgresql": "6.4.3",
|
|
||||||
"awilix": "^8.0.1",
|
"awilix": "^8.0.1",
|
||||||
"ioredis": "^5.4.1",
|
"ioredis": "^5.4.1",
|
||||||
"pg": "^8.13.0",
|
"pg": "^8.13.0",
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
"watch": "tsc --watch"
|
"watch": "tsc --watch"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@medusajs/deps": "2.10.3",
|
||||||
"@medusajs/telemetry": "2.10.3",
|
"@medusajs/telemetry": "2.10.3",
|
||||||
"boxen": "^5",
|
"boxen": "^5",
|
||||||
"chalk": "^5.2.0",
|
"chalk": "^5.2.0",
|
||||||
@@ -23,7 +24,6 @@
|
|||||||
"node-fetch": "^3.3.1",
|
"node-fetch": "^3.3.1",
|
||||||
"open": "^9.1.0",
|
"open": "^9.1.0",
|
||||||
"ora": "^6.3.0",
|
"ora": "^6.3.0",
|
||||||
"pg": "^8.16.3",
|
|
||||||
"slugify": "^1.6.6",
|
"slugify": "^1.6.6",
|
||||||
"uuid": "^9.0.0",
|
"uuid": "^9.0.0",
|
||||||
"validator": "^13.9.0",
|
"validator": "^13.9.0",
|
||||||
@@ -37,7 +37,6 @@
|
|||||||
"@types/inquirer": "^9.0.3",
|
"@types/inquirer": "^9.0.3",
|
||||||
"@types/node": "^20.12.11",
|
"@types/node": "^20.12.11",
|
||||||
"@types/node-emoji": "^1.8.2",
|
"@types/node-emoji": "^1.8.2",
|
||||||
"@types/pg": "^8.6.6",
|
|
||||||
"@types/uuid": "^9.0.1",
|
"@types/uuid": "^9.0.1",
|
||||||
"@types/validator": "^13.7.17",
|
"@types/validator": "^13.7.17",
|
||||||
"@types/wait-on": "^5.3.1",
|
"@types/wait-on": "^5.3.1",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { EOL } from "os"
|
import { EOL } from "os"
|
||||||
import pg from "pg"
|
import type pg from "@medusajs/deps/pg"
|
||||||
import postgresClient, {
|
import postgresClient, {
|
||||||
DEFAULT_HOST,
|
DEFAULT_HOST,
|
||||||
DEFAULT_PORT,
|
DEFAULT_PORT,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import pg from "pg"
|
import pg from "@medusajs/deps/pg"
|
||||||
|
|
||||||
const { Client } = pg
|
const { Client } = pg as any
|
||||||
|
|
||||||
export const DEFAULT_HOST = "localhost"
|
export const DEFAULT_HOST = "localhost"
|
||||||
export const DEFAULT_PORT = 5432
|
export const DEFAULT_PORT = 5432
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import execute from "./execute.js"
|
|||||||
import { EOL } from "os"
|
import { EOL } from "os"
|
||||||
import { displayFactBox, FactBoxOptions } from "./facts.js"
|
import { displayFactBox, FactBoxOptions } from "./facts.js"
|
||||||
import ProcessManager from "./process-manager.js"
|
import ProcessManager from "./process-manager.js"
|
||||||
import type { Client } from "pg"
|
import type { Client } from "@medusajs/deps/pg"
|
||||||
import PackageManager from "./package-manager.js"
|
import PackageManager from "./package-manager.js"
|
||||||
import { updatePackageVersions } from "./update-package-versions.js"
|
import { updatePackageVersions } from "./update-package-versions.js"
|
||||||
|
|
||||||
|
|||||||
@@ -32,20 +32,15 @@
|
|||||||
"author": "Sebastian Rindom",
|
"author": "Sebastian Rindom",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@mikro-orm/core": "6.5.4",
|
|
||||||
"@mikro-orm/knex": "6.5.4",
|
|
||||||
"@mikro-orm/migrations": "6.5.4",
|
|
||||||
"@mikro-orm/postgresql": "6.5.4",
|
|
||||||
"@swc/core": "^1.7.28",
|
"@swc/core": "^1.7.28",
|
||||||
"@swc/jest": "^0.2.36",
|
"@swc/jest": "^0.2.36",
|
||||||
"@types/yargs": "^15.0.15",
|
"@types/yargs": "^15.0.15",
|
||||||
"awilix": "^8.0.1",
|
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"pg": "^8.16.3",
|
|
||||||
"rimraf": "^5.0.1",
|
"rimraf": "^5.0.1",
|
||||||
"typescript": "^5.6.2"
|
"typescript": "^5.6.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@medusajs/deps": "2.10.3",
|
||||||
"@medusajs/telemetry": "2.10.3",
|
"@medusajs/telemetry": "2.10.3",
|
||||||
"@medusajs/utils": "2.10.3",
|
"@medusajs/utils": "2.10.3",
|
||||||
"@types/express": "^4.17.17",
|
"@types/express": "^4.17.17",
|
||||||
@@ -62,7 +57,6 @@
|
|||||||
"is-valid-path": "^0.1.1",
|
"is-valid-path": "^0.1.1",
|
||||||
"meant": "^1.0.3",
|
"meant": "^1.0.3",
|
||||||
"ora": "^5.4.1",
|
"ora": "^5.4.1",
|
||||||
"pg": "^8.16.3",
|
|
||||||
"pg-god": "^1.0.12",
|
"pg-god": "^1.0.12",
|
||||||
"prompts": "^2.4.2",
|
"prompts": "^2.4.2",
|
||||||
"resolve-cwd": "^3.0.0",
|
"resolve-cwd": "^3.0.0",
|
||||||
@@ -71,13 +65,5 @@
|
|||||||
"winston": "^3.8.2",
|
"winston": "^3.8.2",
|
||||||
"yargs": "^15.3.1"
|
"yargs": "^15.3.1"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
|
||||||
"@mikro-orm/core": "6.5.4",
|
|
||||||
"@mikro-orm/knex": "6.5.4",
|
|
||||||
"@mikro-orm/migrations": "6.5.4",
|
|
||||||
"@mikro-orm/postgresql": "6.5.4",
|
|
||||||
"awilix": "^8.0.1",
|
|
||||||
"pg": "^8.16.3"
|
|
||||||
},
|
|
||||||
"gitHead": "81a7ff73d012fda722f6e9ef0bd9ba0232d37808"
|
"gitHead": "81a7ff73d012fda722f6e9ef0bd9ba0232d37808"
|
||||||
}
|
}
|
||||||
@@ -11,7 +11,7 @@ import isValid from "is-valid-path"
|
|||||||
import sysPath from "path"
|
import sysPath from "path"
|
||||||
import path from "path"
|
import path from "path"
|
||||||
import prompts from "prompts"
|
import prompts from "prompts"
|
||||||
import { Pool } from "pg"
|
import { Pool } from "@medusajs/deps/pg"
|
||||||
import url from "url"
|
import url from "url"
|
||||||
import { track } from "@medusajs/telemetry"
|
import { track } from "@medusajs/telemetry"
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|||||||
@@ -27,16 +27,10 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@medusajs/framework": "2.10.3",
|
"@medusajs/framework": "2.10.3",
|
||||||
"@mikro-orm/core": "6.5.4",
|
|
||||||
"@mikro-orm/knex": "6.5.4",
|
|
||||||
"@mikro-orm/migrations": "6.5.4",
|
|
||||||
"@mikro-orm/postgresql": "6.5.4",
|
|
||||||
"@swc/core": "^1.7.28",
|
"@swc/core": "^1.7.28",
|
||||||
"@swc/jest": "^0.2.36",
|
"@swc/jest": "^0.2.36",
|
||||||
"awilix": "^8.0.1",
|
|
||||||
"expect-type": "^0.20.0",
|
"expect-type": "^0.20.0",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"pg": "^8.16.3",
|
|
||||||
"rimraf": "^5.0.1",
|
"rimraf": "^5.0.1",
|
||||||
"typescript": "^5.6.2"
|
"typescript": "^5.6.2"
|
||||||
},
|
},
|
||||||
@@ -46,8 +40,7 @@
|
|||||||
"zod": "3.25.76"
|
"zod": "3.25.76"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@medusajs/framework": "2.10.3",
|
"@medusajs/framework": "2.10.3"
|
||||||
"awilix": "^8.0.1"
|
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "rimraf dist && tsc --build",
|
"build": "rimraf dist && tsc --build",
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { expectTypeOf } from "expect-type"
|
|||||||
import { FixtureEntryPoints } from "../__fixtures__/remote-query"
|
import { FixtureEntryPoints } from "../__fixtures__/remote-query"
|
||||||
import { useQueryGraphStep } from "../use-query-graph"
|
import { useQueryGraphStep } from "../use-query-graph"
|
||||||
import { MedusaContainer } from "@medusajs/framework"
|
import { MedusaContainer } from "@medusajs/framework"
|
||||||
import { asFunction, createContainer } from "awilix"
|
import { asFunction, createContainer } from "@medusajs/framework/awilix"
|
||||||
import { ContainerRegistrationKeys } from "@medusajs/framework/utils"
|
import { ContainerRegistrationKeys } from "@medusajs/framework/utils"
|
||||||
|
|
||||||
describe("useQueryGraphStep", () => {
|
describe("useQueryGraphStep", () => {
|
||||||
|
|||||||
@@ -32,7 +32,14 @@
|
|||||||
"./workflows-sdk": "./dist/workflows-sdk/index.js",
|
"./workflows-sdk": "./dist/workflows-sdk/index.js",
|
||||||
"./workflows-sdk/composer": "./dist/workflows-sdk/composer.js",
|
"./workflows-sdk/composer": "./dist/workflows-sdk/composer.js",
|
||||||
"./modules-sdk": "./dist/modules-sdk/index.js",
|
"./modules-sdk": "./dist/modules-sdk/index.js",
|
||||||
"./migrations": "./dist/migrations/index.js"
|
"./migrations": "./dist/migrations/index.js",
|
||||||
|
"./mikro-orm/cli": "./dist/deps/mikro-orm-cli.js",
|
||||||
|
"./mikro-orm/core": "./dist/deps/mikro-orm-core.js",
|
||||||
|
"./mikro-orm/knex": "./dist/deps/mikro-orm-knex.js",
|
||||||
|
"./mikro-orm/migrations": "./dist/deps/mikro-orm-migrations.js",
|
||||||
|
"./mikro-orm/postgresql": "./dist/deps/mikro-orm-postgresql.js",
|
||||||
|
"./awilix": "./dist/deps/awilix.js",
|
||||||
|
"./pg": "./dist/deps/pg.js"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=20"
|
"node": ">=20"
|
||||||
@@ -56,19 +63,13 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@aws-sdk/client-dynamodb": "^3.218.0",
|
"@aws-sdk/client-dynamodb": "^3.218.0",
|
||||||
"@medusajs/cli": "2.10.3",
|
"@medusajs/cli": "2.10.3",
|
||||||
"@mikro-orm/core": "6.5.4",
|
|
||||||
"@mikro-orm/knex": "6.5.4",
|
|
||||||
"@mikro-orm/migrations": "6.5.4",
|
|
||||||
"@mikro-orm/postgresql": "6.5.4",
|
|
||||||
"@swc/core": "^1.7.28",
|
"@swc/core": "^1.7.28",
|
||||||
"@swc/jest": "^0.2.36",
|
"@swc/jest": "^0.2.36",
|
||||||
"@types/cors": "^2.8.17",
|
"@types/cors": "^2.8.17",
|
||||||
"@types/jsonwebtoken": "^8.5.9",
|
"@types/jsonwebtoken": "^8.5.9",
|
||||||
"awilix": "^8.0.1",
|
|
||||||
"connect-dynamodb": "^3.0.5",
|
"connect-dynamodb": "^3.0.5",
|
||||||
"ioredis": "^5.4.1",
|
"ioredis": "^5.4.1",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"pg": "^8.16.3",
|
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"supertest": "^4.0.2",
|
"supertest": "^4.0.2",
|
||||||
"typescript": "^5.6.2",
|
"typescript": "^5.6.2",
|
||||||
@@ -76,6 +77,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jercle/yargonaut": "^1.1.5",
|
"@jercle/yargonaut": "^1.1.5",
|
||||||
|
"@medusajs/deps": "2.10.3",
|
||||||
"@medusajs/modules-sdk": "2.10.3",
|
"@medusajs/modules-sdk": "2.10.3",
|
||||||
"@medusajs/orchestration": "2.10.3",
|
"@medusajs/orchestration": "2.10.3",
|
||||||
"@medusajs/telemetry": "2.10.3",
|
"@medusajs/telemetry": "2.10.3",
|
||||||
@@ -103,24 +105,14 @@
|
|||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@aws-sdk/client-dynamodb": "^3.218.0",
|
"@aws-sdk/client-dynamodb": "^3.218.0",
|
||||||
"@medusajs/cli": "2.10.3",
|
"@medusajs/cli": "2.10.3",
|
||||||
"@mikro-orm/cli": "6.5.4",
|
|
||||||
"@mikro-orm/core": "6.5.4",
|
|
||||||
"@mikro-orm/knex": "6.5.4",
|
|
||||||
"@mikro-orm/migrations": "6.5.4",
|
|
||||||
"@mikro-orm/postgresql": "6.5.4",
|
|
||||||
"awilix": "^8.0.1",
|
|
||||||
"connect-dynamodb": "^3.0.5",
|
"connect-dynamodb": "^3.0.5",
|
||||||
"ioredis": "^5.4.1",
|
"ioredis": "^5.4.1",
|
||||||
"pg": "^8.16.3",
|
|
||||||
"vite": "^5.4.14"
|
"vite": "^5.4.14"
|
||||||
},
|
},
|
||||||
"peerDependenciesMeta": {
|
"peerDependenciesMeta": {
|
||||||
"@aws-sdk/client-dynamodb": {
|
"@aws-sdk/client-dynamodb": {
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"@mikro-orm/cli": {
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"connect-dynamodb": {
|
"connect-dynamodb": {
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { ContainerRegistrationKeys, getConfigFile } from "@medusajs/utils"
|
import { ContainerRegistrationKeys, getConfigFile } from "@medusajs/utils"
|
||||||
import { asFunction } from "awilix"
|
import { asFunction } from "../deps/awilix"
|
||||||
import { container } from "../container"
|
import { container } from "../container"
|
||||||
import { logger as defaultLogger } from "../logger"
|
import { logger as defaultLogger } from "../logger"
|
||||||
import { ConfigManager } from "./config"
|
import { ConfigManager } from "./config"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
retryExecution,
|
retryExecution,
|
||||||
stringifyCircular,
|
stringifyCircular,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/utils"
|
||||||
import { asValue } from "awilix"
|
import { asValue } from "../deps/awilix"
|
||||||
import { configManager } from "../config"
|
import { configManager } from "../config"
|
||||||
import { container } from "../container"
|
import { container } from "../container"
|
||||||
import { logger } from "../logger"
|
import { logger } from "../logger"
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
export * from "@medusajs/deps/awilix"
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export * from "@medusajs/deps/mikro-orm/cli"
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export * from "@medusajs/deps/mikro-orm/core"
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export * from "@medusajs/deps/mikro-orm/knex"
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export * from "@medusajs/deps/mikro-orm/migrations"
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export * from "@medusajs/deps/mikro-orm/postgresql"
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export * from "@medusajs/deps/pg"
|
||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
FeatureFlag,
|
FeatureFlag,
|
||||||
FlagRouter,
|
FlagRouter,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/utils"
|
||||||
import { asFunction } from "awilix"
|
import { asFunction } from "../deps/awilix"
|
||||||
import { normalize } from "path"
|
import { normalize } from "path"
|
||||||
import { configManager } from "../config"
|
import { configManager } from "../config"
|
||||||
import { container } from "../container"
|
import { container } from "../container"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
} from "@medusajs/modules-sdk"
|
} from "@medusajs/modules-sdk"
|
||||||
import { MedusaContainer } from "@medusajs/types"
|
import { MedusaContainer } from "@medusajs/types"
|
||||||
import { ContainerRegistrationKeys, generateJwtToken } from "@medusajs/utils"
|
import { ContainerRegistrationKeys, generateJwtToken } from "@medusajs/utils"
|
||||||
import { asValue } from "awilix"
|
import { asValue } from "../../../deps/awilix"
|
||||||
import express from "express"
|
import express from "express"
|
||||||
import querystring from "querystring"
|
import querystring from "querystring"
|
||||||
import supertest from "supertest"
|
import supertest from "supertest"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import {
|
|||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
createMedusaContainer,
|
createMedusaContainer,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/utils"
|
||||||
import { asValue } from "awilix"
|
import { asValue } from "../../deps/awilix"
|
||||||
import express from "express"
|
import express from "express"
|
||||||
import { resolve } from "path"
|
import { resolve } from "path"
|
||||||
import { logger as defaultLogger } from "../../logger"
|
import { logger as defaultLogger } from "../../logger"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {
|
|||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
createMedusaContainer,
|
createMedusaContainer,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/utils"
|
||||||
import { asValue } from "awilix"
|
import { asValue } from "../../deps/awilix"
|
||||||
import { join } from "path"
|
import { join } from "path"
|
||||||
import { logger } from "../../logger"
|
import { logger } from "../../logger"
|
||||||
import { MockSchedulerStorage } from "../__fixtures__/mock-scheduler-storage"
|
import { MockSchedulerStorage } from "../__fixtures__/mock-scheduler-storage"
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ import {
|
|||||||
upperCaseFirst,
|
upperCaseFirst,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/utils"
|
||||||
|
|
||||||
import type { Knex } from "@mikro-orm/knex"
|
import type { Knex } from "@medusajs/framework/mikro-orm/knex"
|
||||||
import { aliasTo, asValue } from "awilix"
|
import { aliasTo, asValue } from "./deps/awilix"
|
||||||
import { configManager } from "./config"
|
import { configManager } from "./config"
|
||||||
import {
|
import {
|
||||||
container,
|
container,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { MedusaContainer } from "@medusajs/types"
|
import { MedusaContainer } from "@medusajs/types"
|
||||||
import { Knex } from "@mikro-orm/knex"
|
import { Knex } from "../deps/mikro-orm-knex"
|
||||||
import { glob } from "glob"
|
import { glob } from "glob"
|
||||||
import { join } from "path"
|
import { join } from "path"
|
||||||
import { logger } from "../logger"
|
import { logger } from "../logger"
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
* small, we should be okay with managing this wrapper.
|
* small, we should be okay with managing this wrapper.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { CLIConfigurator, CLIHelper } from "@mikro-orm/cli"
|
import { CLIConfigurator, CLIHelper } from "../deps/mikro-orm-cli"
|
||||||
import { ConfigurationLoader } from "@mikro-orm/core"
|
import { ConfigurationLoader } from "../deps/mikro-orm-core"
|
||||||
import { isAbsolute, join } from "path"
|
import { isAbsolute, join } from "path"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { ContainerRegistrationKeys, Modules } from "@medusajs/utils"
|
import { ContainerRegistrationKeys, Modules } from "@medusajs/utils"
|
||||||
import { asValue } from "awilix"
|
import { asValue } from "../../deps/awilix"
|
||||||
import { join } from "path"
|
import { join } from "path"
|
||||||
import { container } from "../../container"
|
import { container } from "../../container"
|
||||||
import { logger } from "../../logger"
|
import { logger } from "../../logger"
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ import {
|
|||||||
RemoteQueryFunction,
|
RemoteQueryFunction,
|
||||||
} from "@medusajs/types"
|
} from "@medusajs/types"
|
||||||
import { ContainerRegistrationKeys, Modules } from "@medusajs/utils"
|
import { ContainerRegistrationKeys, Modules } from "@medusajs/utils"
|
||||||
import { Knex } from "@mikro-orm/knex"
|
import { Knex } from "../deps/mikro-orm-knex"
|
||||||
import { AwilixContainer, ResolveOptions } from "awilix"
|
import { AwilixContainer, ResolveOptions } from "../deps/awilix"
|
||||||
|
|
||||||
declare module "@medusajs/types" {
|
declare module "@medusajs/types" {
|
||||||
export interface ModuleImplementations {
|
export interface ModuleImplementations {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {
|
|||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
createMedusaContainer,
|
createMedusaContainer,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/utils"
|
||||||
import { asValue } from "awilix"
|
import { asValue } from "../../deps/awilix"
|
||||||
import { join } from "path"
|
import { join } from "path"
|
||||||
import { logger } from "../../logger"
|
import { logger } from "../../logger"
|
||||||
import { productWorkflowId } from "../__fixtures__/workflows/deep-workflows/product-updater"
|
import { productWorkflowId } from "../__fixtures__/workflows/deep-workflows/product-updater"
|
||||||
|
|||||||
@@ -32,30 +32,19 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@medusajs/types": "2.10.3",
|
"@medusajs/types": "2.10.3",
|
||||||
"@mikro-orm/core": "6.5.4",
|
|
||||||
"@mikro-orm/knex": "6.5.4",
|
|
||||||
"@mikro-orm/migrations": "6.5.4",
|
|
||||||
"@mikro-orm/postgresql": "6.5.4",
|
|
||||||
"@swc/core": "^1.7.28",
|
"@swc/core": "^1.7.28",
|
||||||
"@swc/jest": "^0.2.36",
|
"@swc/jest": "^0.2.36",
|
||||||
"awilix": "^8.0.1",
|
|
||||||
"cross-env": "^5.2.1",
|
"cross-env": "^5.2.1",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"pg": "^8.16.3",
|
|
||||||
"rimraf": "^5.0.1",
|
"rimraf": "^5.0.1",
|
||||||
"typescript": "^5.6.2"
|
"typescript": "^5.6.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@medusajs/deps": "2.10.3",
|
||||||
"@medusajs/orchestration": "2.10.3",
|
"@medusajs/orchestration": "2.10.3",
|
||||||
"@medusajs/utils": "2.10.3"
|
"@medusajs/utils": "2.10.3"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@mikro-orm/core": "6.5.4",
|
"express": "^4.21.0"
|
||||||
"@mikro-orm/knex": "6.5.4",
|
|
||||||
"@mikro-orm/migrations": "6.5.4",
|
|
||||||
"@mikro-orm/postgresql": "6.5.4",
|
|
||||||
"awilix": "^8.0.1",
|
|
||||||
"express": "^4.21.0",
|
|
||||||
"pg": "^8.16.3"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import { InternalModuleDeclaration } from "@medusajs/types"
|
import { InternalModuleDeclaration } from "@medusajs/types"
|
||||||
import { MODULE_SCOPE } from "../../types"
|
import { MODULE_SCOPE } from "../../types"
|
||||||
|
|
||||||
import { asValue } from "awilix"
|
import { asValue } from "@medusajs/deps/awilix"
|
||||||
import { MedusaModule } from "../../medusa-module"
|
import { MedusaModule } from "../../medusa-module"
|
||||||
|
|
||||||
const mockRegisterMedusaModule = jest.fn().mockImplementation(() => {
|
const mockRegisterMedusaModule = jest.fn().mockImplementation(() => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { createMedusaContainer } from "@medusajs/utils"
|
import { createMedusaContainer } from "@medusajs/utils"
|
||||||
import { asFunction, Lifetime } from "awilix"
|
import { asFunction, Lifetime } from "@medusajs/deps/awilix"
|
||||||
import { moduleProviderLoader } from "../module-provider-loader"
|
import { moduleProviderLoader } from "../module-provider-loader"
|
||||||
|
|
||||||
describe("modules loader", () => {
|
describe("modules loader", () => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Logger, MedusaContainer, ModuleResolution } from "@medusajs/types"
|
import { Logger, MedusaContainer, ModuleResolution } from "@medusajs/types"
|
||||||
import { asValue } from "awilix"
|
import { asValue } from "@medusajs/deps/awilix"
|
||||||
import { EOL } from "os"
|
import { EOL } from "os"
|
||||||
import { MODULE_SCOPE } from "../types"
|
import { MODULE_SCOPE } from "../types"
|
||||||
import { loadInternalModule } from "./utils"
|
import { loadInternalModule } from "./utils"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
normalizeImportPathWithSource,
|
normalizeImportPathWithSource,
|
||||||
promiseAll,
|
promiseAll,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/utils"
|
||||||
import { asFunction, Lifetime } from "awilix"
|
import { asFunction, Lifetime } from "@medusajs/deps/awilix"
|
||||||
|
|
||||||
export async function moduleProviderLoader({
|
export async function moduleProviderLoader({
|
||||||
container,
|
container,
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { Entity, Property } from "@mikro-orm/core"
|
import { Entity, Property } from "@medusajs/deps/mikro-orm/core"
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class EntityModel {
|
export class EntityModel {
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { Entity, Property } from "@mikro-orm/core"
|
import { Entity, Property } from "@medusajs/deps/mikro-orm/core"
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class Entity2 {
|
export class Entity2 {
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { Entity, Property } from "@mikro-orm/core"
|
import { Entity, Property } from "@medusajs/deps/mikro-orm/core"
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class EntityModel {
|
export class EntityModel {
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { Entity, Property } from "@mikro-orm/core"
|
import { Entity, Property } from "@medusajs/deps/mikro-orm/core"
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class Entity2 {
|
export class Entity2 {
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { Entity, Property } from "@mikro-orm/core"
|
import { Entity, Property } from "@medusajs/deps/mikro-orm/core"
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class EntityModel {
|
export class EntityModel {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import {
|
|||||||
stringifyCircular,
|
stringifyCircular,
|
||||||
toMikroOrmEntities,
|
toMikroOrmEntities,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/utils"
|
||||||
import { asFunction, asValue } from "awilix"
|
import { asFunction, asValue } from "@medusajs/deps/awilix"
|
||||||
import { statSync } from "fs"
|
import { statSync } from "fs"
|
||||||
import { readdir } from "fs/promises"
|
import { readdir } from "fs/promises"
|
||||||
import { dirname, join, resolve } from "path"
|
import { dirname, join, resolve } from "path"
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import {
|
|||||||
promiseAll,
|
promiseAll,
|
||||||
registerFeatureFlag,
|
registerFeatureFlag,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/utils"
|
||||||
import { asValue } from "awilix"
|
import { asValue } from "@medusajs/deps/awilix"
|
||||||
import { Link } from "./link"
|
import { Link } from "./link"
|
||||||
import {
|
import {
|
||||||
MedusaModule,
|
MedusaModule,
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import {
|
|||||||
simpleHash,
|
simpleHash,
|
||||||
stringifyCircular,
|
stringifyCircular,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/utils"
|
||||||
import { asValue } from "awilix"
|
import { asValue } from "@medusajs/deps/awilix"
|
||||||
import { EOL } from "os"
|
import { EOL } from "os"
|
||||||
import {
|
import {
|
||||||
moduleLoader,
|
moduleLoader,
|
||||||
|
|||||||
@@ -27,30 +27,19 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@medusajs/types": "2.10.3",
|
"@medusajs/types": "2.10.3",
|
||||||
"@mikro-orm/core": "6.5.4",
|
|
||||||
"@mikro-orm/knex": "6.5.4",
|
|
||||||
"@mikro-orm/migrations": "6.5.4",
|
|
||||||
"@mikro-orm/postgresql": "6.5.4",
|
|
||||||
"@swc/core": "^1.7.28",
|
"@swc/core": "^1.7.28",
|
||||||
"@swc/jest": "^0.2.36",
|
"@swc/jest": "^0.2.36",
|
||||||
"awilix": "^8.0.1",
|
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"pg": "^8.16.3",
|
|
||||||
"rimraf": "^5.0.1",
|
"rimraf": "^5.0.1",
|
||||||
"typescript": "^5.6.2"
|
"typescript": "^5.6.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@medusajs/deps": "2.10.3",
|
||||||
"@medusajs/utils": "2.10.3",
|
"@medusajs/utils": "2.10.3",
|
||||||
"ulid": "^2.3.0"
|
"ulid": "^2.3.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@mikro-orm/core": "6.5.4",
|
"express": "^4.21.0"
|
||||||
"@mikro-orm/knex": "6.5.4",
|
|
||||||
"@mikro-orm/migrations": "6.5.4",
|
|
||||||
"@mikro-orm/postgresql": "6.5.4",
|
|
||||||
"awilix": "^8.0.1",
|
|
||||||
"express": "^4.21.0",
|
|
||||||
"pg": "^8.16.3"
|
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "rimraf dist && tsc --build",
|
"build": "rimraf dist && tsc --build",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Context, LoadedModule, MedusaContainer } from "@medusajs/types"
|
import { Context, LoadedModule, MedusaContainer } from "@medusajs/types"
|
||||||
import { createMedusaContainer } from "@medusajs/utils"
|
import { createMedusaContainer } from "@medusajs/utils"
|
||||||
import { asValue } from "awilix"
|
import { asValue } from "@medusajs/deps/awilix"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
DistributedTransactionEvents,
|
DistributedTransactionEvents,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
MedusaError,
|
MedusaError,
|
||||||
MedusaModuleType,
|
MedusaModuleType,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/utils"
|
||||||
import { asValue } from "awilix"
|
import { asValue } from "@medusajs/deps/awilix"
|
||||||
import {
|
import {
|
||||||
DistributedTransactionEvent,
|
DistributedTransactionEvent,
|
||||||
DistributedTransactionEvents,
|
DistributedTransactionEvents,
|
||||||
|
|||||||
@@ -35,8 +35,8 @@
|
|||||||
"bignumber.js": "^9.1.2"
|
"bignumber.js": "^9.1.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@medusajs/deps": "2.10.3",
|
||||||
"@types/jsonwebtoken": "^8.5.9",
|
"@types/jsonwebtoken": "^8.5.9",
|
||||||
"awilix": "^8.0.1",
|
|
||||||
"expect-type": "^0.20.0",
|
"expect-type": "^0.20.0",
|
||||||
"ioredis": "^5.4.1",
|
"ioredis": "^5.4.1",
|
||||||
"rimraf": "^5.0.1",
|
"rimraf": "^5.0.1",
|
||||||
@@ -44,7 +44,6 @@
|
|||||||
"vite": "^5.4.14"
|
"vite": "^5.4.14"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"awilix": "^8.0.1",
|
|
||||||
"ioredis": "^5.4.1",
|
"ioredis": "^5.4.1",
|
||||||
"vite": "^5 || ^6"
|
"vite": "^5 || ^6"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { AwilixContainer, ResolveOptions } from "awilix"
|
import type { AwilixContainer, ResolveOptions } from "@medusajs/deps/awilix"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The following interface acts as a bucket that other modules or the
|
* The following interface acts as a bucket that other modules or the
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
FindOptions,
|
FindOptions,
|
||||||
UpsertWithReplaceConfig,
|
UpsertWithReplaceConfig,
|
||||||
} from "./index"
|
} from "./index"
|
||||||
import { EntityClass } from "@mikro-orm/core"
|
import type { EntityClass } from "@medusajs/deps/mikro-orm/core"
|
||||||
import { IDmlEntity, InferTypeOf } from "../dml"
|
import { IDmlEntity, InferTypeOf } from "../dml"
|
||||||
|
|
||||||
type EntityClassName = string
|
type EntityClassName = string
|
||||||
|
|||||||
@@ -27,18 +27,12 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@medusajs/types": "2.10.3",
|
"@medusajs/types": "2.10.3",
|
||||||
"@mikro-orm/core": "6.5.4",
|
|
||||||
"@mikro-orm/knex": "6.5.4",
|
|
||||||
"@mikro-orm/migrations": "6.5.4",
|
|
||||||
"@mikro-orm/postgresql": "6.5.4",
|
|
||||||
"@swc/core": "^1.7.28",
|
"@swc/core": "^1.7.28",
|
||||||
"@swc/jest": "^0.2.36",
|
"@swc/jest": "^0.2.36",
|
||||||
"@types/express": "^4.17.21",
|
"@types/express": "^4.17.21",
|
||||||
"awilix": "^8.0.1",
|
|
||||||
"expect-type": "^0.20.0",
|
"expect-type": "^0.20.0",
|
||||||
"express": "^4.21.0",
|
"express": "^4.21.0",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"pg": "^8.16.3",
|
|
||||||
"pg-god": "^1.0.12",
|
"pg-god": "^1.0.12",
|
||||||
"rimraf": "^5.0.1",
|
"rimraf": "^5.0.1",
|
||||||
"typescript": "^5.6.2"
|
"typescript": "^5.6.2"
|
||||||
@@ -48,6 +42,7 @@
|
|||||||
"@graphql-codegen/typescript": "^4.0.9",
|
"@graphql-codegen/typescript": "^4.0.9",
|
||||||
"@graphql-tools/merge": "^9.0.7",
|
"@graphql-tools/merge": "^9.0.7",
|
||||||
"@graphql-tools/schema": "^10.0.6",
|
"@graphql-tools/schema": "^10.0.6",
|
||||||
|
"@medusajs/deps": "2.10.3",
|
||||||
"@types/pluralize": "^0.0.33",
|
"@types/pluralize": "^0.0.33",
|
||||||
"bignumber.js": "^9.1.2",
|
"bignumber.js": "^9.1.2",
|
||||||
"dotenv": "^16.4.5",
|
"dotenv": "^16.4.5",
|
||||||
@@ -60,13 +55,7 @@
|
|||||||
"zod": "3.25.76"
|
"zod": "3.25.76"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@mikro-orm/core": "6.5.4",
|
"express": "^4.21.0"
|
||||||
"@mikro-orm/knex": "6.5.4",
|
|
||||||
"@mikro-orm/migrations": "6.5.4",
|
|
||||||
"@mikro-orm/postgresql": "6.5.4",
|
|
||||||
"awilix": "^8.0.1",
|
|
||||||
"express": "^4.21.0",
|
|
||||||
"pg": "^8.16.3"
|
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "rimraf dist && tsc --build",
|
"build": "rimraf dist && tsc --build",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Index } from "@mikro-orm/core"
|
import { Index } from "@medusajs/deps/mikro-orm/core"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a PSQL index statement
|
* Create a PSQL index statement
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
ClassOrFunctionReturning,
|
ClassOrFunctionReturning,
|
||||||
createContainer,
|
createContainer,
|
||||||
Resolver,
|
Resolver,
|
||||||
} from "awilix"
|
} from "@medusajs/deps/awilix"
|
||||||
|
|
||||||
function asArray(
|
function asArray(
|
||||||
resolvers: (ClassOrFunctionReturning<unknown> | Resolver<unknown>)[]
|
resolvers: (ClassOrFunctionReturning<unknown> | Resolver<unknown>)[]
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
PrimaryKey,
|
PrimaryKey,
|
||||||
Property,
|
Property,
|
||||||
Rel,
|
Rel,
|
||||||
} from "@mikro-orm/core"
|
} from "@medusajs/deps/mikro-orm/core"
|
||||||
import { Searchable } from "../decorators/searchable"
|
import { Searchable } from "../decorators/searchable"
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
import { Entity, MikroORM, OnInit, Property } from "@mikro-orm/core"
|
import {
|
||||||
import { defineConfig } from "@mikro-orm/postgresql"
|
Entity,
|
||||||
|
MikroORM,
|
||||||
|
OnInit,
|
||||||
|
Property,
|
||||||
|
} from "@medusajs/deps/mikro-orm/core"
|
||||||
|
import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql"
|
||||||
import { BaseEntity } from "../base-entity"
|
import { BaseEntity } from "../base-entity"
|
||||||
|
|
||||||
describe("BaseEntity", () => {
|
describe("BaseEntity", () => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { BigNumberRawValue } from "@medusajs/types"
|
import { BigNumberRawValue } from "@medusajs/types"
|
||||||
import { Entity, MikroORM, PrimaryKey } from "@mikro-orm/core"
|
import { Entity, MikroORM, PrimaryKey } from "@medusajs/deps/mikro-orm/core"
|
||||||
import { defineConfig } from "@mikro-orm/postgresql"
|
import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql"
|
||||||
import { BigNumber } from "../../../totals/big-number"
|
import { BigNumber } from "../../../totals/big-number"
|
||||||
import { MikroOrmBigNumberProperty } from "../big-number-field"
|
import { MikroOrmBigNumberProperty } from "../big-number-field"
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
import { MikroORM } from "@mikro-orm/core"
|
import { MikroORM } from "@medusajs/deps/mikro-orm/core"
|
||||||
import { defineConfig } from "@mikro-orm/postgresql"
|
import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql"
|
||||||
import { SearchableEntity1, SearchableEntity2 } from "../__fixtures__/utils"
|
import { SearchableEntity1, SearchableEntity2 } from "../__fixtures__/utils"
|
||||||
import { mikroOrmFreeTextSearchFilterOptionsFactory } from "../mikro-orm-free-text-search-filter"
|
import { mikroOrmFreeTextSearchFilterOptionsFactory } from "../mikro-orm-free-text-search-filter"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { MikroORM } from "@mikro-orm/core"
|
import { MikroORM } from "@medusajs/deps/mikro-orm/core"
|
||||||
import { defineConfig } from "@mikro-orm/postgresql"
|
import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql"
|
||||||
import {
|
import {
|
||||||
Entity1WithUnDecoratedProp,
|
Entity1WithUnDecoratedProp,
|
||||||
Entity2WithUnDecoratedProp,
|
Entity2WithUnDecoratedProp,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
OnInit,
|
OnInit,
|
||||||
OptionalProps,
|
OptionalProps,
|
||||||
PrimaryKey,
|
PrimaryKey,
|
||||||
} from "@mikro-orm/core"
|
} from "@medusajs/deps/mikro-orm/core"
|
||||||
import { generateEntityId } from "../../common"
|
import { generateEntityId } from "../../common"
|
||||||
|
|
||||||
@Entity({ abstract: true })
|
@Entity({ abstract: true })
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { BigNumberInput } from "@medusajs/types"
|
import { BigNumberInput } from "@medusajs/types"
|
||||||
import { EntityProperty, Platform, Property, Type } from "@mikro-orm/core"
|
import { EntityProperty, Platform, Property, Type } from "@medusajs/deps/mikro-orm/core"
|
||||||
import { isDefined, isObject, isPresent, trimZeros } from "../../common"
|
import { isDefined, isObject, isPresent, trimZeros } from "../../common"
|
||||||
import { BigNumber } from "../../totals/big-number"
|
import { BigNumber } from "../../totals/big-number"
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { Constructor } from "@medusajs/types"
|
import { Constructor } from "@medusajs/types"
|
||||||
import { MikroORM, Utils } from "@mikro-orm/core"
|
import { MikroORM, Utils } from "@medusajs/deps/mikro-orm/core"
|
||||||
import {
|
import {
|
||||||
Migrator as BaseMigrator,
|
Migrator as BaseMigrator,
|
||||||
Migration,
|
Migration,
|
||||||
UmzugMigration,
|
UmzugMigration,
|
||||||
} from "@mikro-orm/migrations"
|
} from "@medusajs/deps/mikro-orm/migrations"
|
||||||
import { isFileDisabled, isFileSkipped } from "../../common/define-file-config"
|
import { isFileDisabled, isFileSkipped } from "../../common/define-file-config"
|
||||||
import { dynamicImport } from "../../common/dynamic-import"
|
import { dynamicImport } from "../../common/dynamic-import"
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
NotFoundError,
|
NotFoundError,
|
||||||
NotNullConstraintViolationException,
|
NotNullConstraintViolationException,
|
||||||
UniqueConstraintViolationException,
|
UniqueConstraintViolationException,
|
||||||
} from "@mikro-orm/core"
|
} from "@medusajs/deps/mikro-orm/core"
|
||||||
import { MedusaError, upperCaseFirst } from "../../common"
|
import { MedusaError, upperCaseFirst } from "../../common"
|
||||||
|
|
||||||
function parseValue(value: string) {
|
function parseValue(value: string) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { MetadataStorage } from "@mikro-orm/core"
|
import { MetadataStorage } from "@medusajs/deps/mikro-orm/core"
|
||||||
|
|
||||||
export function ForeignKey() {
|
export function ForeignKey() {
|
||||||
return function (target, propertyName) {
|
return function (target, propertyName) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { MetadataStorage } from "@mikro-orm/core"
|
import { MetadataStorage } from "@medusajs/deps/mikro-orm/core"
|
||||||
|
|
||||||
export function Searchable() {
|
export function Searchable() {
|
||||||
return function (target, propertyName) {
|
return function (target, propertyName) {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
PrimaryKey,
|
PrimaryKey,
|
||||||
Property,
|
Property,
|
||||||
Rel,
|
Rel,
|
||||||
} from "@mikro-orm/core"
|
} from "@medusajs/deps/mikro-orm/core"
|
||||||
import { Searchable } from "../../decorators/searchable"
|
import { Searchable } from "../../decorators/searchable"
|
||||||
|
|
||||||
// Circular dependency one level
|
// Circular dependency one level
|
||||||
|
|||||||
+2
-2
@@ -13,8 +13,8 @@ import {
|
|||||||
Property,
|
Property,
|
||||||
Unique,
|
Unique,
|
||||||
wrap,
|
wrap,
|
||||||
} from "@mikro-orm/core"
|
} from "@medusajs/deps/mikro-orm/core"
|
||||||
import { defineConfig } from "@mikro-orm/postgresql"
|
import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql"
|
||||||
import BigNumber from "bignumber.js"
|
import BigNumber from "bignumber.js"
|
||||||
import { dropDatabase } from "pg-god"
|
import { dropDatabase } from "pg-god"
|
||||||
import { MikroOrmBigNumberProperty } from "../../big-number-field"
|
import { MikroOrmBigNumberProperty } from "../../big-number-field"
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
import { MikroORM } from "@mikro-orm/core"
|
import { MikroORM } from "@medusajs/deps/mikro-orm/core"
|
||||||
import { defineConfig, SqlEntityManager } from "@mikro-orm/postgresql"
|
import {
|
||||||
|
defineConfig,
|
||||||
|
SqlEntityManager,
|
||||||
|
} from "@medusajs/deps/mikro-orm/postgresql"
|
||||||
import { dropDatabase } from "pg-god"
|
import { dropDatabase } from "pg-god"
|
||||||
import { mikroOrmUpdateDeletedAtRecursively } from "../../utils"
|
import { mikroOrmUpdateDeletedAtRecursively } from "../../utils"
|
||||||
import { getDatabaseURL, pgGodCredentials } from "../__fixtures__/database"
|
import { getDatabaseURL, pgGodCredentials } from "../__fixtures__/database"
|
||||||
@@ -17,8 +20,8 @@ import {
|
|||||||
|
|
||||||
const dbName = "mikroorm-utils-integration-1"
|
const dbName = "mikroorm-utils-integration-1"
|
||||||
|
|
||||||
jest.mock("@mikro-orm/core", () => ({
|
jest.mock("@medusajs/deps/mikro-orm/core", () => ({
|
||||||
...jest.requireActual("@mikro-orm/core"),
|
...jest.requireActual("@medusajs/deps/mikro-orm/core"),
|
||||||
wrap: jest.fn().mockImplementation((entity) => ({
|
wrap: jest.fn().mockImplementation((entity) => ({
|
||||||
...entity,
|
...entity,
|
||||||
init: jest.fn().mockResolvedValue(entity),
|
init: jest.fn().mockResolvedValue(entity),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { ModuleServiceInitializeOptions } from "@medusajs/types"
|
import { ModuleServiceInitializeOptions } from "@medusajs/types"
|
||||||
import { Filter as MikroORMFilter } from "@mikro-orm/core"
|
import { Filter as MikroORMFilter } from "@medusajs/deps/mikro-orm/core"
|
||||||
import { TSMigrationGenerator } from "@mikro-orm/migrations"
|
import { TSMigrationGenerator } from "@medusajs/deps/mikro-orm/migrations"
|
||||||
import { isString, retryExecution, stringifyCircular } from "../../common"
|
import { isString, retryExecution, stringifyCircular } from "../../common"
|
||||||
import { normalizeMigrationSQL } from "../utils"
|
import { normalizeMigrationSQL } from "../utils"
|
||||||
import { CustomDBMigrator } from "./custom-db-migrator"
|
import { CustomDBMigrator } from "./custom-db-migrator"
|
||||||
@@ -83,7 +83,9 @@ export async function mikroOrmCreateConnection(
|
|||||||
schema = database.connection.context?.client?.config?.searchPath
|
schema = database.connection.context?.client?.config?.searchPath
|
||||||
}
|
}
|
||||||
|
|
||||||
const { MikroORM, defineConfig } = await import("@mikro-orm/postgresql")
|
const { MikroORM, defineConfig } = await import(
|
||||||
|
"@medusajs/deps/mikro-orm/postgresql"
|
||||||
|
)
|
||||||
const mikroOrmConfig = defineConfig({
|
const mikroOrmConfig = defineConfig({
|
||||||
discovery: { disableDynamicFileAccess: true, warnWhenNoEntities: false },
|
discovery: { disableDynamicFileAccess: true, warnWhenNoEntities: false },
|
||||||
entities,
|
entities,
|
||||||
|
|||||||
@@ -3,9 +3,10 @@ import type {
|
|||||||
EntityProperty,
|
EntityProperty,
|
||||||
FindOneOptions,
|
FindOneOptions,
|
||||||
FindOptions,
|
FindOptions,
|
||||||
} from "@mikro-orm/core"
|
EntityMetadata,
|
||||||
import { EntityMetadata, raw, ReferenceKind } from "@mikro-orm/core"
|
} from "@medusajs/deps/mikro-orm/core"
|
||||||
import { SqlEntityManager } from "@mikro-orm/postgresql"
|
import { raw, ReferenceKind } from "@medusajs/deps/mikro-orm/postgresql"
|
||||||
|
import { SqlEntityManager } from "@medusajs/deps/mikro-orm/postgresql"
|
||||||
|
|
||||||
export const FreeTextSearchFilterKeyPrefix = "freeTextSearch_"
|
export const FreeTextSearchFilterKeyPrefix = "freeTextSearch_"
|
||||||
|
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ import {
|
|||||||
FilterQuery as MikroFilterQuery,
|
FilterQuery as MikroFilterQuery,
|
||||||
FindOptions as MikroOptions,
|
FindOptions as MikroOptions,
|
||||||
ReferenceKind,
|
ReferenceKind,
|
||||||
} from "@mikro-orm/core"
|
} from "@medusajs/deps/mikro-orm/core"
|
||||||
import { SqlEntityManager } from "@mikro-orm/postgresql"
|
import { SqlEntityManager } from "@medusajs/deps/mikro-orm/postgresql"
|
||||||
import {
|
import {
|
||||||
arrayDifference,
|
arrayDifference,
|
||||||
isString,
|
isString,
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import {
|
|||||||
ReferenceKind,
|
ReferenceKind,
|
||||||
SerializationContext,
|
SerializationContext,
|
||||||
Utils,
|
Utils,
|
||||||
} from "@mikro-orm/core"
|
} from "@medusajs/deps/mikro-orm/core"
|
||||||
|
|
||||||
const STATIC_OPTIONS_SHAPE: {
|
const STATIC_OPTIONS_SHAPE: {
|
||||||
populate: string[] | boolean | undefined
|
populate: string[] | boolean | undefined
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { EntityMetadata, FindOptions } from "@mikro-orm/core"
|
import { EntityMetadata, FindOptions } from "@medusajs/deps/mikro-orm/core"
|
||||||
import { SqlEntityManager } from "@mikro-orm/postgresql"
|
import { SqlEntityManager } from "@medusajs/deps/mikro-orm/postgresql"
|
||||||
import { promiseAll } from "../../common"
|
import { promiseAll } from "../../common"
|
||||||
import { isString } from "../../common/is-string"
|
import { isString } from "../../common/is-string"
|
||||||
import { buildQuery } from "../../modules-sdk/build-query"
|
import { buildQuery } from "../../modules-sdk/build-query"
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
import { ArrayType, EntityMetadata, MetadataStorage } from "@mikro-orm/core"
|
import {
|
||||||
|
ArrayType,
|
||||||
|
EntityMetadata,
|
||||||
|
MetadataStorage,
|
||||||
|
} from "@medusajs/deps/mikro-orm/core"
|
||||||
import { expectTypeOf } from "expect-type"
|
import { expectTypeOf } from "expect-type"
|
||||||
import { DmlEntity } from "../entity"
|
import { DmlEntity } from "../entity"
|
||||||
import { model } from "../entity-builder"
|
import { model } from "../entity-builder"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import type {
|
|||||||
Infer,
|
Infer,
|
||||||
PropertyType,
|
PropertyType,
|
||||||
} from "@medusajs/types"
|
} from "@medusajs/types"
|
||||||
import { Entity, Filter, MetadataStorage } from "@mikro-orm/core"
|
import { Entity, Filter, MetadataStorage } from "@medusajs/deps/mikro-orm/core"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
mikroOrmFreeTextSearchFilterOptionsFactory,
|
mikroOrmFreeTextSearchFilterOptionsFactory,
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
PrimaryKey,
|
PrimaryKey,
|
||||||
Property,
|
Property,
|
||||||
Utils,
|
Utils,
|
||||||
} from "@mikro-orm/core"
|
} from "@medusajs/deps/mikro-orm/core"
|
||||||
import { generateEntityId, isDefined } from "../../../common"
|
import { generateEntityId, isDefined } from "../../../common"
|
||||||
import { MikroOrmBigNumberProperty } from "../../../dal"
|
import { MikroOrmBigNumberProperty } from "../../../dal"
|
||||||
import { PrimaryKeyModifier } from "../../properties/primary-key"
|
import { PrimaryKeyModifier } from "../../properties/primary-key"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import {
|
|||||||
OnInit,
|
OnInit,
|
||||||
Property,
|
Property,
|
||||||
rel,
|
rel,
|
||||||
} from "@mikro-orm/core"
|
} from "@medusajs/deps/mikro-orm/core"
|
||||||
import { camelToSnakeCase, pluralize } from "../../../common"
|
import { camelToSnakeCase, pluralize } from "../../../common"
|
||||||
import { DmlEntity } from "../../entity"
|
import { DmlEntity } from "../../entity"
|
||||||
import { BelongsTo } from "../../relations"
|
import { BelongsTo } from "../../relations"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Check, CheckOptions } from "@mikro-orm/core"
|
import { Check, CheckOptions } from "@medusajs/deps/mikro-orm/core"
|
||||||
import { CheckConstraint, EntityConstructor } from "@medusajs/types"
|
import { CheckConstraint, EntityConstructor } from "@medusajs/types"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { DMLSchema, EntityConstructor, EntityIndex } from "@medusajs/types"
|
import { DMLSchema, EntityConstructor, EntityIndex } from "@medusajs/types"
|
||||||
import { MetadataStorage } from "@mikro-orm/core"
|
import { MetadataStorage } from "@medusajs/deps/mikro-orm/core"
|
||||||
import { arrayDifference } from "../../../common"
|
import { arrayDifference } from "../../../common"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { EntityConstructor } from "@medusajs/types"
|
import { EntityConstructor } from "@medusajs/types"
|
||||||
import { MetadataStorage, MikroORM } from "@mikro-orm/core"
|
import { MetadataStorage, MikroORM } from "@medusajs/deps/mikro-orm/core"
|
||||||
import { defineConfig } from "@mikro-orm/postgresql"
|
import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql"
|
||||||
import { join } from "path"
|
import { join } from "path"
|
||||||
import { createDatabase, dropDatabase } from "pg-god"
|
import { createDatabase, dropDatabase } from "pg-god"
|
||||||
import { FileSystem } from "../../../common"
|
import { FileSystem } from "../../../common"
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ import {
|
|||||||
CheckConstraintViolationException,
|
CheckConstraintViolationException,
|
||||||
MetadataStorage,
|
MetadataStorage,
|
||||||
MikroORM,
|
MikroORM,
|
||||||
} from "@mikro-orm/core"
|
} from "@medusajs/deps/mikro-orm/core"
|
||||||
import { defineConfig } from "@mikro-orm/postgresql"
|
import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql"
|
||||||
import { join } from "path"
|
import { join } from "path"
|
||||||
import { createDatabase, dropDatabase } from "pg-god"
|
import { createDatabase, dropDatabase } from "pg-god"
|
||||||
import { FileSystem } from "../../../common"
|
import { FileSystem } from "../../../common"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { EntityConstructor } from "@medusajs/types"
|
import { EntityConstructor } from "@medusajs/types"
|
||||||
import { MetadataStorage, MikroORM } from "@mikro-orm/core"
|
import { MetadataStorage, MikroORM } from "@medusajs/deps/mikro-orm/core"
|
||||||
import { defineConfig } from "@mikro-orm/postgresql"
|
import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql"
|
||||||
import { join } from "path"
|
import { join } from "path"
|
||||||
import { createDatabase, dropDatabase } from "pg-god"
|
import { createDatabase, dropDatabase } from "pg-god"
|
||||||
import { FileSystem } from "../../../common"
|
import { FileSystem } from "../../../common"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { EntityConstructor } from "@medusajs/types"
|
import { EntityConstructor } from "@medusajs/types"
|
||||||
import { MetadataStorage, MikroORM } from "@mikro-orm/core"
|
import { MetadataStorage, MikroORM } from "@medusajs/deps/mikro-orm/core"
|
||||||
import { defineConfig } from "@mikro-orm/postgresql"
|
import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql"
|
||||||
import { join } from "path"
|
import { join } from "path"
|
||||||
import { createDatabase, dropDatabase } from "pg-god"
|
import { createDatabase, dropDatabase } from "pg-god"
|
||||||
import { FileSystem } from "../../../common"
|
import { FileSystem } from "../../../common"
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
import { EntityConstructor } from "@medusajs/types"
|
import { EntityConstructor } from "@medusajs/types"
|
||||||
import { MetadataStorage, MikroORM } from "@mikro-orm/core"
|
import { MetadataStorage, MikroORM } from "@medusajs/deps/mikro-orm/core"
|
||||||
import { defineConfig, SqlEntityManager } from "@mikro-orm/postgresql"
|
import {
|
||||||
|
defineConfig,
|
||||||
|
SqlEntityManager,
|
||||||
|
} from "@medusajs/deps/mikro-orm/postgresql"
|
||||||
import { join } from "path"
|
import { join } from "path"
|
||||||
import { createDatabase, dropDatabase } from "pg-god"
|
import { createDatabase, dropDatabase } from "pg-god"
|
||||||
import { FileSystem } from "../../../common"
|
import { FileSystem } from "../../../common"
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
import { MikroORM, MikroORMOptions } from "@mikro-orm/core"
|
import { MikroORM, MikroORMOptions } from "@medusajs/deps/mikro-orm/core"
|
||||||
import {
|
import {
|
||||||
MigrateOptions,
|
MigrateOptions,
|
||||||
MigrationResult,
|
MigrationResult,
|
||||||
UmzugMigration,
|
UmzugMigration,
|
||||||
} from "@mikro-orm/migrations"
|
} from "@medusajs/deps/mikro-orm/migrations"
|
||||||
import { defineConfig, PostgreSqlDriver } from "@mikro-orm/postgresql"
|
import {
|
||||||
|
defineConfig,
|
||||||
|
PostgreSqlDriver,
|
||||||
|
} from "@medusajs/deps/mikro-orm/postgresql"
|
||||||
import { EventEmitter } from "events"
|
import { EventEmitter } from "events"
|
||||||
import { access, mkdir, rename, writeFile } from "fs/promises"
|
import { access, mkdir, rename, writeFile } from "fs/promises"
|
||||||
import { dirname, join } from "path"
|
import { dirname, join } from "path"
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
import { join } from "path"
|
import { join } from "path"
|
||||||
import { setTimeout } from "timers/promises"
|
import { setTimeout } from "timers/promises"
|
||||||
import { MetadataStorage } from "@mikro-orm/core"
|
import { MetadataStorage } from "@medusajs/deps/mikro-orm/core"
|
||||||
|
|
||||||
import { Migrations } from "../../index"
|
import { Migrations } from "../../index"
|
||||||
import { FileSystem } from "../../../common"
|
import { FileSystem } from "../../../common"
|
||||||
|
|||||||
+3
-3
@@ -1,6 +1,6 @@
|
|||||||
import { MetadataStorage } from "@mikro-orm/core"
|
import { MetadataStorage } from "@medusajs/deps/mikro-orm/core"
|
||||||
import { TSMigrationGenerator } from "@mikro-orm/migrations"
|
import { TSMigrationGenerator } from "@medusajs/deps/mikro-orm/migrations"
|
||||||
import { MikroORM } from "@mikro-orm/postgresql"
|
import { MikroORM } from "@medusajs/deps/mikro-orm/postgresql"
|
||||||
import { join } from "path"
|
import { join } from "path"
|
||||||
import { createDatabase, dropDatabase } from "pg-god"
|
import { createDatabase, dropDatabase } from "pg-god"
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -1,8 +1,8 @@
|
|||||||
import { join } from "path"
|
import { join } from "path"
|
||||||
import { MikroORM } from "@mikro-orm/postgresql"
|
import { MikroORM } from "@medusajs/deps/mikro-orm/postgresql"
|
||||||
import { MetadataStorage } from "@mikro-orm/core"
|
import { MetadataStorage } from "@medusajs/deps/mikro-orm/core"
|
||||||
import { createDatabase, dropDatabase } from "pg-god"
|
import { createDatabase, dropDatabase } from "pg-god"
|
||||||
import { TSMigrationGenerator } from "@mikro-orm/migrations"
|
import { TSMigrationGenerator } from "@medusajs/deps/mikro-orm/migrations"
|
||||||
|
|
||||||
import { model } from "../../../dml"
|
import { model } from "../../../dml"
|
||||||
import { FileSystem } from "../../../common"
|
import { FileSystem } from "../../../common"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { ModuleServiceInitializeOptions } from "@medusajs/types"
|
import { ModuleServiceInitializeOptions } from "@medusajs/types"
|
||||||
import { knex } from "@mikro-orm/postgresql"
|
import { knex } from "@medusajs/deps/mikro-orm/postgresql"
|
||||||
|
|
||||||
type Options = ModuleServiceInitializeOptions["database"]
|
type Options = ModuleServiceInitializeOptions["database"]
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
RepositoryService,
|
RepositoryService,
|
||||||
} from "@medusajs/types"
|
} from "@medusajs/types"
|
||||||
|
|
||||||
import { asClass } from "awilix"
|
import { asClass } from "@medusajs/deps/awilix"
|
||||||
import { MedusaInternalService } from "../medusa-internal-service"
|
import { MedusaInternalService } from "../medusa-internal-service"
|
||||||
import { lowerCaseFirst } from "../../common"
|
import { lowerCaseFirst } from "../../common"
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
import { Logger, MedusaContainer, ModulesSdkTypes } from "@medusajs/types"
|
import { Logger, MedusaContainer, ModulesSdkTypes } from "@medusajs/types"
|
||||||
import { PostgreSqlDriver, SqlEntityManager } from "@mikro-orm/postgresql"
|
import {
|
||||||
import { asValue } from "awilix"
|
PostgreSqlDriver,
|
||||||
|
SqlEntityManager,
|
||||||
|
} from "@medusajs/deps/mikro-orm/postgresql"
|
||||||
|
import { asValue } from "@medusajs/deps/awilix"
|
||||||
import { ContainerRegistrationKeys, MedusaError } from "../../common"
|
import { ContainerRegistrationKeys, MedusaError } from "../../common"
|
||||||
import { mikroOrmCreateConnection } from "../../dal"
|
import { mikroOrmCreateConnection } from "../../dal"
|
||||||
import { isSharedConnectionSymbol } from "../create-pg-connection"
|
import { isSharedConnectionSymbol } from "../create-pg-connection"
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import {
|
|||||||
type EntityClass,
|
type EntityClass,
|
||||||
type EntityManager,
|
type EntityManager,
|
||||||
type EntitySchema,
|
type EntitySchema,
|
||||||
} from "@mikro-orm/core"
|
} from "@medusajs/deps/mikro-orm/core"
|
||||||
import {
|
import {
|
||||||
isDefined,
|
isDefined,
|
||||||
isObject,
|
isObject,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { LoaderOptions, Logger, ModulesSdkTypes } from "@medusajs/types"
|
import { LoaderOptions, Logger, ModulesSdkTypes } from "@medusajs/types"
|
||||||
import { EntitySchema } from "@mikro-orm/core"
|
import { EntitySchema } from "@medusajs/deps/mikro-orm/core"
|
||||||
import { EOL } from "os"
|
import { EOL } from "os"
|
||||||
import { resolve } from "path"
|
import { resolve } from "path"
|
||||||
import { dynamicImport, isFileSkipped } from "../../common"
|
import { dynamicImport, isFileSkipped } from "../../common"
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import type {
|
|||||||
EntityClassGroup,
|
EntityClassGroup,
|
||||||
EntitySchema,
|
EntitySchema,
|
||||||
MikroORMOptions,
|
MikroORMOptions,
|
||||||
} from "@mikro-orm/core"
|
} from "@medusajs/deps/mikro-orm/core"
|
||||||
import { defineConfig } from "@mikro-orm/postgresql"
|
import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql"
|
||||||
import { kebabCase } from "../common"
|
import { kebabCase } from "../common"
|
||||||
import { CustomDBMigrator, CustomTsMigrationGenerator } from "../dal"
|
import { CustomDBMigrator, CustomTsMigrationGenerator } from "../dal"
|
||||||
import { DmlEntity, toMikroOrmEntities } from "../dml"
|
import { DmlEntity, toMikroOrmEntities } from "../dml"
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Client, type ClientConfig } from "pg"
|
import { Client, type ClientConfig } from "@medusajs/deps/pg"
|
||||||
import { parse } from "pg-connection-string"
|
import { parse } from "pg-connection-string"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -28,34 +28,23 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@medusajs/types": "2.10.3",
|
"@medusajs/types": "2.10.3",
|
||||||
"@mikro-orm/core": "6.5.4",
|
|
||||||
"@mikro-orm/knex": "6.5.4",
|
|
||||||
"@mikro-orm/migrations": "6.5.4",
|
|
||||||
"@mikro-orm/postgresql": "6.5.4",
|
|
||||||
"@swc/core": "^1.7.28",
|
"@swc/core": "^1.7.28",
|
||||||
"@swc/jest": "^0.2.36",
|
"@swc/jest": "^0.2.36",
|
||||||
"awilix": "^8.0.1",
|
|
||||||
"expect-type": "^0.20.0",
|
"expect-type": "^0.20.0",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"pg": "^8.16.3",
|
|
||||||
"rimraf": "^5.0.1",
|
"rimraf": "^5.0.1",
|
||||||
"typescript": "^5.6.2",
|
"typescript": "^5.6.2",
|
||||||
"zod": "3.25.76"
|
"zod": "3.25.76"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@medusajs/deps": "2.10.3",
|
||||||
"@medusajs/modules-sdk": "2.10.3",
|
"@medusajs/modules-sdk": "2.10.3",
|
||||||
"@medusajs/orchestration": "2.10.3",
|
"@medusajs/orchestration": "2.10.3",
|
||||||
"@medusajs/utils": "2.10.3",
|
"@medusajs/utils": "2.10.3",
|
||||||
"ulid": "^2.3.0"
|
"ulid": "^2.3.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@mikro-orm/core": "6.5.4",
|
"express": "^4.21.0"
|
||||||
"@mikro-orm/knex": "6.5.4",
|
|
||||||
"@mikro-orm/migrations": "6.5.4",
|
|
||||||
"@mikro-orm/postgresql": "6.5.4",
|
|
||||||
"awilix": "^8.0.1",
|
|
||||||
"express": "^4.21.0",
|
|
||||||
"pg": "^8.16.3"
|
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "rimraf dist && tsc --build",
|
"build": "rimraf dist && tsc --build",
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
Modules,
|
Modules,
|
||||||
promiseAll,
|
promiseAll,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/utils"
|
||||||
import { asValue } from "awilix"
|
import { asValue } from "@medusajs/deps/awilix"
|
||||||
import { setTimeout } from "timers/promises"
|
import { setTimeout } from "timers/promises"
|
||||||
import {
|
import {
|
||||||
createStep,
|
createStep,
|
||||||
|
|||||||
Loaded 100 of 349 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user