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:
co-authored by
Oli Juhl
parent
55f89b2151
commit
12a96a7c70
@@ -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 { Migration } from "@mikro-orm/migrations"
|
||||
import { Migration } from "@medusajs/framework/mikro-orm/migrations"
|
||||
|
||||
defineFileConfig({
|
||||
isDisabled: () => !FeatureFlag.isFeatureEnabled("custom_ff"),
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"@medusajs/core-flows": "workspace:*",
|
||||
"@medusajs/customer": "workspace:^",
|
||||
"@medusajs/event-bus-local": "workspace:*",
|
||||
"@medusajs/framework": "workspace:*",
|
||||
"@medusajs/fulfillment": "workspace:^",
|
||||
"@medusajs/fulfillment-manual": "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 {
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
"@medusajs/currency": "workspace:^",
|
||||
"@medusajs/customer": "workspace:^",
|
||||
"@medusajs/event-bus-local": "workspace:*",
|
||||
"@medusajs/framework": "workspace:^",
|
||||
"@medusajs/framework": "workspace:*",
|
||||
"@medusajs/fulfillment": "workspace:^",
|
||||
"@medusajs/fulfillment-manual": "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 {
|
||||
override async up(): Promise<void> {
|
||||
|
||||
@@ -21,10 +21,6 @@
|
||||
"scrypt-kdf": "^2.0.1",
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
"@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",
|
||||
"ioredis": "^5.4.1",
|
||||
"pg": "^8.13.0",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"watch": "tsc --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@medusajs/deps": "2.10.3",
|
||||
"@medusajs/telemetry": "2.10.3",
|
||||
"boxen": "^5",
|
||||
"chalk": "^5.2.0",
|
||||
@@ -23,7 +24,6 @@
|
||||
"node-fetch": "^3.3.1",
|
||||
"open": "^9.1.0",
|
||||
"ora": "^6.3.0",
|
||||
"pg": "^8.16.3",
|
||||
"slugify": "^1.6.6",
|
||||
"uuid": "^9.0.0",
|
||||
"validator": "^13.9.0",
|
||||
@@ -37,7 +37,6 @@
|
||||
"@types/inquirer": "^9.0.3",
|
||||
"@types/node": "^20.12.11",
|
||||
"@types/node-emoji": "^1.8.2",
|
||||
"@types/pg": "^8.6.6",
|
||||
"@types/uuid": "^9.0.1",
|
||||
"@types/validator": "^13.7.17",
|
||||
"@types/wait-on": "^5.3.1",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { EOL } from "os"
|
||||
import pg from "pg"
|
||||
import type pg from "@medusajs/deps/pg"
|
||||
import postgresClient, {
|
||||
DEFAULT_HOST,
|
||||
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_PORT = 5432
|
||||
|
||||
@@ -5,7 +5,7 @@ import execute from "./execute.js"
|
||||
import { EOL } from "os"
|
||||
import { displayFactBox, FactBoxOptions } from "./facts.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 { updatePackageVersions } from "./update-package-versions.js"
|
||||
|
||||
|
||||
@@ -32,20 +32,15 @@
|
||||
"author": "Sebastian Rindom",
|
||||
"license": "MIT",
|
||||
"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/jest": "^0.2.36",
|
||||
"@types/yargs": "^15.0.15",
|
||||
"awilix": "^8.0.1",
|
||||
"jest": "^29.7.0",
|
||||
"pg": "^8.16.3",
|
||||
"rimraf": "^5.0.1",
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@medusajs/deps": "2.10.3",
|
||||
"@medusajs/telemetry": "2.10.3",
|
||||
"@medusajs/utils": "2.10.3",
|
||||
"@types/express": "^4.17.17",
|
||||
@@ -62,7 +57,6 @@
|
||||
"is-valid-path": "^0.1.1",
|
||||
"meant": "^1.0.3",
|
||||
"ora": "^5.4.1",
|
||||
"pg": "^8.16.3",
|
||||
"pg-god": "^1.0.12",
|
||||
"prompts": "^2.4.2",
|
||||
"resolve-cwd": "^3.0.0",
|
||||
@@ -71,13 +65,5 @@
|
||||
"winston": "^3.8.2",
|
||||
"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"
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import isValid from "is-valid-path"
|
||||
import sysPath from "path"
|
||||
import path from "path"
|
||||
import prompts from "prompts"
|
||||
import { Pool } from "pg"
|
||||
import { Pool } from "@medusajs/deps/pg"
|
||||
import url from "url"
|
||||
import { track } from "@medusajs/telemetry"
|
||||
// @ts-ignore
|
||||
|
||||
@@ -27,16 +27,10 @@
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@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/jest": "^0.2.36",
|
||||
"awilix": "^8.0.1",
|
||||
"expect-type": "^0.20.0",
|
||||
"jest": "^29.7.0",
|
||||
"pg": "^8.16.3",
|
||||
"rimraf": "^5.0.1",
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
@@ -46,8 +40,7 @@
|
||||
"zod": "3.25.76"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@medusajs/framework": "2.10.3",
|
||||
"awilix": "^8.0.1"
|
||||
"@medusajs/framework": "2.10.3"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rimraf dist && tsc --build",
|
||||
|
||||
@@ -3,7 +3,7 @@ import { expectTypeOf } from "expect-type"
|
||||
import { FixtureEntryPoints } from "../__fixtures__/remote-query"
|
||||
import { useQueryGraphStep } from "../use-query-graph"
|
||||
import { MedusaContainer } from "@medusajs/framework"
|
||||
import { asFunction, createContainer } from "awilix"
|
||||
import { asFunction, createContainer } from "@medusajs/framework/awilix"
|
||||
import { ContainerRegistrationKeys } from "@medusajs/framework/utils"
|
||||
|
||||
describe("useQueryGraphStep", () => {
|
||||
|
||||
@@ -32,7 +32,14 @@
|
||||
"./workflows-sdk": "./dist/workflows-sdk/index.js",
|
||||
"./workflows-sdk/composer": "./dist/workflows-sdk/composer.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": {
|
||||
"node": ">=20"
|
||||
@@ -56,19 +63,13 @@
|
||||
"devDependencies": {
|
||||
"@aws-sdk/client-dynamodb": "^3.218.0",
|
||||
"@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/jest": "^0.2.36",
|
||||
"@types/cors": "^2.8.17",
|
||||
"@types/jsonwebtoken": "^8.5.9",
|
||||
"awilix": "^8.0.1",
|
||||
"connect-dynamodb": "^3.0.5",
|
||||
"ioredis": "^5.4.1",
|
||||
"jest": "^29.7.0",
|
||||
"pg": "^8.16.3",
|
||||
"rimraf": "^3.0.2",
|
||||
"supertest": "^4.0.2",
|
||||
"typescript": "^5.6.2",
|
||||
@@ -76,6 +77,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@jercle/yargonaut": "^1.1.5",
|
||||
"@medusajs/deps": "2.10.3",
|
||||
"@medusajs/modules-sdk": "2.10.3",
|
||||
"@medusajs/orchestration": "2.10.3",
|
||||
"@medusajs/telemetry": "2.10.3",
|
||||
@@ -103,24 +105,14 @@
|
||||
"peerDependencies": {
|
||||
"@aws-sdk/client-dynamodb": "^3.218.0",
|
||||
"@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",
|
||||
"ioredis": "^5.4.1",
|
||||
"pg": "^8.16.3",
|
||||
"vite": "^5.4.14"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@aws-sdk/client-dynamodb": {
|
||||
"optional": true
|
||||
},
|
||||
"@mikro-orm/cli": {
|
||||
"optional": true
|
||||
},
|
||||
"connect-dynamodb": {
|
||||
"optional": true
|
||||
},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ContainerRegistrationKeys, getConfigFile } from "@medusajs/utils"
|
||||
import { asFunction } from "awilix"
|
||||
import { asFunction } from "../deps/awilix"
|
||||
import { container } from "../container"
|
||||
import { logger as defaultLogger } from "../logger"
|
||||
import { ConfigManager } from "./config"
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
retryExecution,
|
||||
stringifyCircular,
|
||||
} from "@medusajs/utils"
|
||||
import { asValue } from "awilix"
|
||||
import { asValue } from "../deps/awilix"
|
||||
import { configManager } from "../config"
|
||||
import { container } from "../container"
|
||||
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,
|
||||
FlagRouter,
|
||||
} from "@medusajs/utils"
|
||||
import { asFunction } from "awilix"
|
||||
import { asFunction } from "../deps/awilix"
|
||||
import { normalize } from "path"
|
||||
import { configManager } from "../config"
|
||||
import { container } from "../container"
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
} from "@medusajs/modules-sdk"
|
||||
import { MedusaContainer } from "@medusajs/types"
|
||||
import { ContainerRegistrationKeys, generateJwtToken } from "@medusajs/utils"
|
||||
import { asValue } from "awilix"
|
||||
import { asValue } from "../../../deps/awilix"
|
||||
import express from "express"
|
||||
import querystring from "querystring"
|
||||
import supertest from "supertest"
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
ContainerRegistrationKeys,
|
||||
createMedusaContainer,
|
||||
} from "@medusajs/utils"
|
||||
import { asValue } from "awilix"
|
||||
import { asValue } from "../../deps/awilix"
|
||||
import express from "express"
|
||||
import { resolve } from "path"
|
||||
import { logger as defaultLogger } from "../../logger"
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
ContainerRegistrationKeys,
|
||||
createMedusaContainer,
|
||||
} from "@medusajs/utils"
|
||||
import { asValue } from "awilix"
|
||||
import { asValue } from "../../deps/awilix"
|
||||
import { join } from "path"
|
||||
import { logger } from "../../logger"
|
||||
import { MockSchedulerStorage } from "../__fixtures__/mock-scheduler-storage"
|
||||
|
||||
@@ -25,8 +25,8 @@ import {
|
||||
upperCaseFirst,
|
||||
} from "@medusajs/utils"
|
||||
|
||||
import type { Knex } from "@mikro-orm/knex"
|
||||
import { aliasTo, asValue } from "awilix"
|
||||
import type { Knex } from "@medusajs/framework/mikro-orm/knex"
|
||||
import { aliasTo, asValue } from "./deps/awilix"
|
||||
import { configManager } from "./config"
|
||||
import {
|
||||
container,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { MedusaContainer } from "@medusajs/types"
|
||||
import { Knex } from "@mikro-orm/knex"
|
||||
import { Knex } from "../deps/mikro-orm-knex"
|
||||
import { glob } from "glob"
|
||||
import { join } from "path"
|
||||
import { logger } from "../logger"
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
* small, we should be okay with managing this wrapper.
|
||||
*/
|
||||
|
||||
import { CLIConfigurator, CLIHelper } from "@mikro-orm/cli"
|
||||
import { ConfigurationLoader } from "@mikro-orm/core"
|
||||
import { CLIConfigurator, CLIHelper } from "../deps/mikro-orm-cli"
|
||||
import { ConfigurationLoader } from "../deps/mikro-orm-core"
|
||||
import { isAbsolute, join } from "path"
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ContainerRegistrationKeys, Modules } from "@medusajs/utils"
|
||||
import { asValue } from "awilix"
|
||||
import { asValue } from "../../deps/awilix"
|
||||
import { join } from "path"
|
||||
import { container } from "../../container"
|
||||
import { logger } from "../../logger"
|
||||
|
||||
@@ -32,8 +32,8 @@ import {
|
||||
RemoteQueryFunction,
|
||||
} from "@medusajs/types"
|
||||
import { ContainerRegistrationKeys, Modules } from "@medusajs/utils"
|
||||
import { Knex } from "@mikro-orm/knex"
|
||||
import { AwilixContainer, ResolveOptions } from "awilix"
|
||||
import { Knex } from "../deps/mikro-orm-knex"
|
||||
import { AwilixContainer, ResolveOptions } from "../deps/awilix"
|
||||
|
||||
declare module "@medusajs/types" {
|
||||
export interface ModuleImplementations {
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
ContainerRegistrationKeys,
|
||||
createMedusaContainer,
|
||||
} from "@medusajs/utils"
|
||||
import { asValue } from "awilix"
|
||||
import { asValue } from "../../deps/awilix"
|
||||
import { join } from "path"
|
||||
import { logger } from "../../logger"
|
||||
import { productWorkflowId } from "../__fixtures__/workflows/deep-workflows/product-updater"
|
||||
|
||||
@@ -32,30 +32,19 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@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/jest": "^0.2.36",
|
||||
"awilix": "^8.0.1",
|
||||
"cross-env": "^5.2.1",
|
||||
"jest": "^29.7.0",
|
||||
"pg": "^8.16.3",
|
||||
"rimraf": "^5.0.1",
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@medusajs/deps": "2.10.3",
|
||||
"@medusajs/orchestration": "2.10.3",
|
||||
"@medusajs/utils": "2.10.3"
|
||||
},
|
||||
"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",
|
||||
"express": "^4.21.0",
|
||||
"pg": "^8.16.3"
|
||||
"express": "^4.21.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { InternalModuleDeclaration } from "@medusajs/types"
|
||||
import { MODULE_SCOPE } from "../../types"
|
||||
|
||||
import { asValue } from "awilix"
|
||||
import { asValue } from "@medusajs/deps/awilix"
|
||||
import { MedusaModule } from "../../medusa-module"
|
||||
|
||||
const mockRegisterMedusaModule = jest.fn().mockImplementation(() => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createMedusaContainer } from "@medusajs/utils"
|
||||
import { asFunction, Lifetime } from "awilix"
|
||||
import { asFunction, Lifetime } from "@medusajs/deps/awilix"
|
||||
import { moduleProviderLoader } from "../module-provider-loader"
|
||||
|
||||
describe("modules loader", () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Logger, MedusaContainer, ModuleResolution } from "@medusajs/types"
|
||||
import { asValue } from "awilix"
|
||||
import { asValue } from "@medusajs/deps/awilix"
|
||||
import { EOL } from "os"
|
||||
import { MODULE_SCOPE } from "../types"
|
||||
import { loadInternalModule } from "./utils"
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
normalizeImportPathWithSource,
|
||||
promiseAll,
|
||||
} from "@medusajs/utils"
|
||||
import { asFunction, Lifetime } from "awilix"
|
||||
import { asFunction, Lifetime } from "@medusajs/deps/awilix"
|
||||
|
||||
export async function moduleProviderLoader({
|
||||
container,
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Entity, Property } from "@mikro-orm/core"
|
||||
import { Entity, Property } from "@medusajs/deps/mikro-orm/core"
|
||||
|
||||
@Entity()
|
||||
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()
|
||||
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()
|
||||
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()
|
||||
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()
|
||||
export class EntityModel {
|
||||
|
||||
@@ -31,7 +31,7 @@ import {
|
||||
stringifyCircular,
|
||||
toMikroOrmEntities,
|
||||
} from "@medusajs/utils"
|
||||
import { asFunction, asValue } from "awilix"
|
||||
import { asFunction, asValue } from "@medusajs/deps/awilix"
|
||||
import { statSync } from "fs"
|
||||
import { readdir } from "fs/promises"
|
||||
import { dirname, join, resolve } from "path"
|
||||
|
||||
@@ -33,7 +33,7 @@ import {
|
||||
promiseAll,
|
||||
registerFeatureFlag,
|
||||
} from "@medusajs/utils"
|
||||
import { asValue } from "awilix"
|
||||
import { asValue } from "@medusajs/deps/awilix"
|
||||
import { Link } from "./link"
|
||||
import {
|
||||
MedusaModule,
|
||||
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
simpleHash,
|
||||
stringifyCircular,
|
||||
} from "@medusajs/utils"
|
||||
import { asValue } from "awilix"
|
||||
import { asValue } from "@medusajs/deps/awilix"
|
||||
import { EOL } from "os"
|
||||
import {
|
||||
moduleLoader,
|
||||
|
||||
@@ -27,30 +27,19 @@
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@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/jest": "^0.2.36",
|
||||
"awilix": "^8.0.1",
|
||||
"jest": "^29.7.0",
|
||||
"pg": "^8.16.3",
|
||||
"rimraf": "^5.0.1",
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@medusajs/deps": "2.10.3",
|
||||
"@medusajs/utils": "2.10.3",
|
||||
"ulid": "^2.3.0"
|
||||
},
|
||||
"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",
|
||||
"express": "^4.21.0",
|
||||
"pg": "^8.16.3"
|
||||
"express": "^4.21.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rimraf dist && tsc --build",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Context, LoadedModule, MedusaContainer } from "@medusajs/types"
|
||||
import { createMedusaContainer } from "@medusajs/utils"
|
||||
import { asValue } from "awilix"
|
||||
import { asValue } from "@medusajs/deps/awilix"
|
||||
|
||||
import {
|
||||
DistributedTransactionEvents,
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
MedusaError,
|
||||
MedusaModuleType,
|
||||
} from "@medusajs/utils"
|
||||
import { asValue } from "awilix"
|
||||
import { asValue } from "@medusajs/deps/awilix"
|
||||
import {
|
||||
DistributedTransactionEvent,
|
||||
DistributedTransactionEvents,
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
"bignumber.js": "^9.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@medusajs/deps": "2.10.3",
|
||||
"@types/jsonwebtoken": "^8.5.9",
|
||||
"awilix": "^8.0.1",
|
||||
"expect-type": "^0.20.0",
|
||||
"ioredis": "^5.4.1",
|
||||
"rimraf": "^5.0.1",
|
||||
@@ -44,7 +44,6 @@
|
||||
"vite": "^5.4.14"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"awilix": "^8.0.1",
|
||||
"ioredis": "^5.4.1",
|
||||
"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
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
FindOptions,
|
||||
UpsertWithReplaceConfig,
|
||||
} from "./index"
|
||||
import { EntityClass } from "@mikro-orm/core"
|
||||
import type { EntityClass } from "@medusajs/deps/mikro-orm/core"
|
||||
import { IDmlEntity, InferTypeOf } from "../dml"
|
||||
|
||||
type EntityClassName = string
|
||||
|
||||
@@ -27,18 +27,12 @@
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@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/jest": "^0.2.36",
|
||||
"@types/express": "^4.17.21",
|
||||
"awilix": "^8.0.1",
|
||||
"expect-type": "^0.20.0",
|
||||
"express": "^4.21.0",
|
||||
"jest": "^29.7.0",
|
||||
"pg": "^8.16.3",
|
||||
"pg-god": "^1.0.12",
|
||||
"rimraf": "^5.0.1",
|
||||
"typescript": "^5.6.2"
|
||||
@@ -48,6 +42,7 @@
|
||||
"@graphql-codegen/typescript": "^4.0.9",
|
||||
"@graphql-tools/merge": "^9.0.7",
|
||||
"@graphql-tools/schema": "^10.0.6",
|
||||
"@medusajs/deps": "2.10.3",
|
||||
"@types/pluralize": "^0.0.33",
|
||||
"bignumber.js": "^9.1.2",
|
||||
"dotenv": "^16.4.5",
|
||||
@@ -60,13 +55,7 @@
|
||||
"zod": "3.25.76"
|
||||
},
|
||||
"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",
|
||||
"express": "^4.21.0",
|
||||
"pg": "^8.16.3"
|
||||
"express": "^4.21.0"
|
||||
},
|
||||
"scripts": {
|
||||
"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
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
ClassOrFunctionReturning,
|
||||
createContainer,
|
||||
Resolver,
|
||||
} from "awilix"
|
||||
} from "@medusajs/deps/awilix"
|
||||
|
||||
function asArray(
|
||||
resolvers: (ClassOrFunctionReturning<unknown> | Resolver<unknown>)[]
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
PrimaryKey,
|
||||
Property,
|
||||
Rel,
|
||||
} from "@mikro-orm/core"
|
||||
} from "@medusajs/deps/mikro-orm/core"
|
||||
import { Searchable } from "../decorators/searchable"
|
||||
|
||||
@Entity()
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
import { Entity, MikroORM, OnInit, Property } from "@mikro-orm/core"
|
||||
import { defineConfig } from "@mikro-orm/postgresql"
|
||||
import {
|
||||
Entity,
|
||||
MikroORM,
|
||||
OnInit,
|
||||
Property,
|
||||
} from "@medusajs/deps/mikro-orm/core"
|
||||
import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql"
|
||||
import { BaseEntity } from "../base-entity"
|
||||
|
||||
describe("BaseEntity", () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { BigNumberRawValue } from "@medusajs/types"
|
||||
import { Entity, MikroORM, PrimaryKey } from "@mikro-orm/core"
|
||||
import { defineConfig } from "@mikro-orm/postgresql"
|
||||
import { Entity, MikroORM, PrimaryKey } from "@medusajs/deps/mikro-orm/core"
|
||||
import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql"
|
||||
import { BigNumber } from "../../../totals/big-number"
|
||||
import { MikroOrmBigNumberProperty } from "../big-number-field"
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import { MikroORM } from "@mikro-orm/core"
|
||||
import { defineConfig } from "@mikro-orm/postgresql"
|
||||
import { MikroORM } from "@medusajs/deps/mikro-orm/core"
|
||||
import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql"
|
||||
import { SearchableEntity1, SearchableEntity2 } from "../__fixtures__/utils"
|
||||
import { mikroOrmFreeTextSearchFilterOptionsFactory } from "../mikro-orm-free-text-search-filter"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { MikroORM } from "@mikro-orm/core"
|
||||
import { defineConfig } from "@mikro-orm/postgresql"
|
||||
import { MikroORM } from "@medusajs/deps/mikro-orm/core"
|
||||
import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql"
|
||||
import {
|
||||
Entity1WithUnDecoratedProp,
|
||||
Entity2WithUnDecoratedProp,
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
OnInit,
|
||||
OptionalProps,
|
||||
PrimaryKey,
|
||||
} from "@mikro-orm/core"
|
||||
} from "@medusajs/deps/mikro-orm/core"
|
||||
import { generateEntityId } from "../../common"
|
||||
|
||||
@Entity({ abstract: true })
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
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 { BigNumber } from "../../totals/big-number"
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Constructor } from "@medusajs/types"
|
||||
import { MikroORM, Utils } from "@mikro-orm/core"
|
||||
import { MikroORM, Utils } from "@medusajs/deps/mikro-orm/core"
|
||||
import {
|
||||
Migrator as BaseMigrator,
|
||||
Migration,
|
||||
UmzugMigration,
|
||||
} from "@mikro-orm/migrations"
|
||||
} from "@medusajs/deps/mikro-orm/migrations"
|
||||
import { isFileDisabled, isFileSkipped } from "../../common/define-file-config"
|
||||
import { dynamicImport } from "../../common/dynamic-import"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
NotFoundError,
|
||||
NotNullConstraintViolationException,
|
||||
UniqueConstraintViolationException,
|
||||
} from "@mikro-orm/core"
|
||||
} from "@medusajs/deps/mikro-orm/core"
|
||||
import { MedusaError, upperCaseFirst } from "../../common"
|
||||
|
||||
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() {
|
||||
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() {
|
||||
return function (target, propertyName) {
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
PrimaryKey,
|
||||
Property,
|
||||
Rel,
|
||||
} from "@mikro-orm/core"
|
||||
} from "@medusajs/deps/mikro-orm/core"
|
||||
import { Searchable } from "../../decorators/searchable"
|
||||
|
||||
// Circular dependency one level
|
||||
|
||||
+2
-2
@@ -13,8 +13,8 @@ import {
|
||||
Property,
|
||||
Unique,
|
||||
wrap,
|
||||
} from "@mikro-orm/core"
|
||||
import { defineConfig } from "@mikro-orm/postgresql"
|
||||
} from "@medusajs/deps/mikro-orm/core"
|
||||
import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql"
|
||||
import BigNumber from "bignumber.js"
|
||||
import { dropDatabase } from "pg-god"
|
||||
import { MikroOrmBigNumberProperty } from "../../big-number-field"
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import { MikroORM } from "@mikro-orm/core"
|
||||
import { defineConfig, SqlEntityManager } from "@mikro-orm/postgresql"
|
||||
import { MikroORM } from "@medusajs/deps/mikro-orm/core"
|
||||
import {
|
||||
defineConfig,
|
||||
SqlEntityManager,
|
||||
} from "@medusajs/deps/mikro-orm/postgresql"
|
||||
import { dropDatabase } from "pg-god"
|
||||
import { mikroOrmUpdateDeletedAtRecursively } from "../../utils"
|
||||
import { getDatabaseURL, pgGodCredentials } from "../__fixtures__/database"
|
||||
@@ -17,8 +20,8 @@ import {
|
||||
|
||||
const dbName = "mikroorm-utils-integration-1"
|
||||
|
||||
jest.mock("@mikro-orm/core", () => ({
|
||||
...jest.requireActual("@mikro-orm/core"),
|
||||
jest.mock("@medusajs/deps/mikro-orm/core", () => ({
|
||||
...jest.requireActual("@medusajs/deps/mikro-orm/core"),
|
||||
wrap: jest.fn().mockImplementation((entity) => ({
|
||||
...entity,
|
||||
init: jest.fn().mockResolvedValue(entity),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ModuleServiceInitializeOptions } from "@medusajs/types"
|
||||
import { Filter as MikroORMFilter } from "@mikro-orm/core"
|
||||
import { TSMigrationGenerator } from "@mikro-orm/migrations"
|
||||
import { Filter as MikroORMFilter } from "@medusajs/deps/mikro-orm/core"
|
||||
import { TSMigrationGenerator } from "@medusajs/deps/mikro-orm/migrations"
|
||||
import { isString, retryExecution, stringifyCircular } from "../../common"
|
||||
import { normalizeMigrationSQL } from "../utils"
|
||||
import { CustomDBMigrator } from "./custom-db-migrator"
|
||||
@@ -83,7 +83,9 @@ export async function mikroOrmCreateConnection(
|
||||
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({
|
||||
discovery: { disableDynamicFileAccess: true, warnWhenNoEntities: false },
|
||||
entities,
|
||||
|
||||
@@ -3,9 +3,10 @@ import type {
|
||||
EntityProperty,
|
||||
FindOneOptions,
|
||||
FindOptions,
|
||||
} from "@mikro-orm/core"
|
||||
import { EntityMetadata, raw, ReferenceKind } from "@mikro-orm/core"
|
||||
import { SqlEntityManager } from "@mikro-orm/postgresql"
|
||||
EntityMetadata,
|
||||
} from "@medusajs/deps/mikro-orm/core"
|
||||
import { raw, ReferenceKind } from "@medusajs/deps/mikro-orm/postgresql"
|
||||
import { SqlEntityManager } from "@medusajs/deps/mikro-orm/postgresql"
|
||||
|
||||
export const FreeTextSearchFilterKeyPrefix = "freeTextSearch_"
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ import {
|
||||
FilterQuery as MikroFilterQuery,
|
||||
FindOptions as MikroOptions,
|
||||
ReferenceKind,
|
||||
} from "@mikro-orm/core"
|
||||
import { SqlEntityManager } from "@mikro-orm/postgresql"
|
||||
} from "@medusajs/deps/mikro-orm/core"
|
||||
import { SqlEntityManager } from "@medusajs/deps/mikro-orm/postgresql"
|
||||
import {
|
||||
arrayDifference,
|
||||
isString,
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
ReferenceKind,
|
||||
SerializationContext,
|
||||
Utils,
|
||||
} from "@mikro-orm/core"
|
||||
} from "@medusajs/deps/mikro-orm/core"
|
||||
|
||||
const STATIC_OPTIONS_SHAPE: {
|
||||
populate: string[] | boolean | undefined
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { EntityMetadata, FindOptions } from "@mikro-orm/core"
|
||||
import { SqlEntityManager } from "@mikro-orm/postgresql"
|
||||
import { EntityMetadata, FindOptions } from "@medusajs/deps/mikro-orm/core"
|
||||
import { SqlEntityManager } from "@medusajs/deps/mikro-orm/postgresql"
|
||||
import { promiseAll } from "../../common"
|
||||
import { isString } from "../../common/is-string"
|
||||
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 { DmlEntity } from "../entity"
|
||||
import { model } from "../entity-builder"
|
||||
|
||||
@@ -6,7 +6,7 @@ import type {
|
||||
Infer,
|
||||
PropertyType,
|
||||
} from "@medusajs/types"
|
||||
import { Entity, Filter, MetadataStorage } from "@mikro-orm/core"
|
||||
import { Entity, Filter, MetadataStorage } from "@medusajs/deps/mikro-orm/core"
|
||||
|
||||
import {
|
||||
mikroOrmFreeTextSearchFilterOptionsFactory,
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
PrimaryKey,
|
||||
Property,
|
||||
Utils,
|
||||
} from "@mikro-orm/core"
|
||||
} from "@medusajs/deps/mikro-orm/core"
|
||||
import { generateEntityId, isDefined } from "../../../common"
|
||||
import { MikroOrmBigNumberProperty } from "../../../dal"
|
||||
import { PrimaryKeyModifier } from "../../properties/primary-key"
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
OnInit,
|
||||
Property,
|
||||
rel,
|
||||
} from "@mikro-orm/core"
|
||||
} from "@medusajs/deps/mikro-orm/core"
|
||||
import { camelToSnakeCase, pluralize } from "../../../common"
|
||||
import { DmlEntity } from "../../entity"
|
||||
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"
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
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"
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { EntityConstructor } from "@medusajs/types"
|
||||
import { MetadataStorage, MikroORM } from "@mikro-orm/core"
|
||||
import { defineConfig } from "@mikro-orm/postgresql"
|
||||
import { MetadataStorage, MikroORM } from "@medusajs/deps/mikro-orm/core"
|
||||
import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql"
|
||||
import { join } from "path"
|
||||
import { createDatabase, dropDatabase } from "pg-god"
|
||||
import { FileSystem } from "../../../common"
|
||||
|
||||
@@ -3,8 +3,8 @@ import {
|
||||
CheckConstraintViolationException,
|
||||
MetadataStorage,
|
||||
MikroORM,
|
||||
} from "@mikro-orm/core"
|
||||
import { defineConfig } from "@mikro-orm/postgresql"
|
||||
} from "@medusajs/deps/mikro-orm/core"
|
||||
import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql"
|
||||
import { join } from "path"
|
||||
import { createDatabase, dropDatabase } from "pg-god"
|
||||
import { FileSystem } from "../../../common"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { EntityConstructor } from "@medusajs/types"
|
||||
import { MetadataStorage, MikroORM } from "@mikro-orm/core"
|
||||
import { defineConfig } from "@mikro-orm/postgresql"
|
||||
import { MetadataStorage, MikroORM } from "@medusajs/deps/mikro-orm/core"
|
||||
import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql"
|
||||
import { join } from "path"
|
||||
import { createDatabase, dropDatabase } from "pg-god"
|
||||
import { FileSystem } from "../../../common"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { EntityConstructor } from "@medusajs/types"
|
||||
import { MetadataStorage, MikroORM } from "@mikro-orm/core"
|
||||
import { defineConfig } from "@mikro-orm/postgresql"
|
||||
import { MetadataStorage, MikroORM } from "@medusajs/deps/mikro-orm/core"
|
||||
import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql"
|
||||
import { join } from "path"
|
||||
import { createDatabase, dropDatabase } from "pg-god"
|
||||
import { FileSystem } from "../../../common"
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { EntityConstructor } from "@medusajs/types"
|
||||
import { MetadataStorage, MikroORM } from "@mikro-orm/core"
|
||||
import { defineConfig, SqlEntityManager } from "@mikro-orm/postgresql"
|
||||
import { MetadataStorage, MikroORM } from "@medusajs/deps/mikro-orm/core"
|
||||
import {
|
||||
defineConfig,
|
||||
SqlEntityManager,
|
||||
} from "@medusajs/deps/mikro-orm/postgresql"
|
||||
import { join } from "path"
|
||||
import { createDatabase, dropDatabase } from "pg-god"
|
||||
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 {
|
||||
MigrateOptions,
|
||||
MigrationResult,
|
||||
UmzugMigration,
|
||||
} from "@mikro-orm/migrations"
|
||||
import { defineConfig, PostgreSqlDriver } from "@mikro-orm/postgresql"
|
||||
} from "@medusajs/deps/mikro-orm/migrations"
|
||||
import {
|
||||
defineConfig,
|
||||
PostgreSqlDriver,
|
||||
} from "@medusajs/deps/mikro-orm/postgresql"
|
||||
import { EventEmitter } from "events"
|
||||
import { access, mkdir, rename, writeFile } from "fs/promises"
|
||||
import { dirname, join } from "path"
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import { join } from "path"
|
||||
import { setTimeout } from "timers/promises"
|
||||
import { MetadataStorage } from "@mikro-orm/core"
|
||||
import { MetadataStorage } from "@medusajs/deps/mikro-orm/core"
|
||||
|
||||
import { Migrations } from "../../index"
|
||||
import { FileSystem } from "../../../common"
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
import { MetadataStorage } from "@mikro-orm/core"
|
||||
import { TSMigrationGenerator } from "@mikro-orm/migrations"
|
||||
import { MikroORM } from "@mikro-orm/postgresql"
|
||||
import { MetadataStorage } from "@medusajs/deps/mikro-orm/core"
|
||||
import { TSMigrationGenerator } from "@medusajs/deps/mikro-orm/migrations"
|
||||
import { MikroORM } from "@medusajs/deps/mikro-orm/postgresql"
|
||||
import { join } from "path"
|
||||
import { createDatabase, dropDatabase } from "pg-god"
|
||||
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
import { join } from "path"
|
||||
import { MikroORM } from "@mikro-orm/postgresql"
|
||||
import { MetadataStorage } from "@mikro-orm/core"
|
||||
import { MikroORM } from "@medusajs/deps/mikro-orm/postgresql"
|
||||
import { MetadataStorage } from "@medusajs/deps/mikro-orm/core"
|
||||
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 { FileSystem } from "../../../common"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ModuleServiceInitializeOptions } from "@medusajs/types"
|
||||
import { knex } from "@mikro-orm/postgresql"
|
||||
import { knex } from "@medusajs/deps/mikro-orm/postgresql"
|
||||
|
||||
type Options = ModuleServiceInitializeOptions["database"]
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
RepositoryService,
|
||||
} from "@medusajs/types"
|
||||
|
||||
import { asClass } from "awilix"
|
||||
import { asClass } from "@medusajs/deps/awilix"
|
||||
import { MedusaInternalService } from "../medusa-internal-service"
|
||||
import { lowerCaseFirst } from "../../common"
|
||||
import {
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { Logger, MedusaContainer, ModulesSdkTypes } from "@medusajs/types"
|
||||
import { PostgreSqlDriver, SqlEntityManager } from "@mikro-orm/postgresql"
|
||||
import { asValue } from "awilix"
|
||||
import {
|
||||
PostgreSqlDriver,
|
||||
SqlEntityManager,
|
||||
} from "@medusajs/deps/mikro-orm/postgresql"
|
||||
import { asValue } from "@medusajs/deps/awilix"
|
||||
import { ContainerRegistrationKeys, MedusaError } from "../../common"
|
||||
import { mikroOrmCreateConnection } from "../../dal"
|
||||
import { isSharedConnectionSymbol } from "../create-pg-connection"
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
type EntityClass,
|
||||
type EntityManager,
|
||||
type EntitySchema,
|
||||
} from "@mikro-orm/core"
|
||||
} from "@medusajs/deps/mikro-orm/core"
|
||||
import {
|
||||
isDefined,
|
||||
isObject,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
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 { resolve } from "path"
|
||||
import { dynamicImport, isFileSkipped } from "../../common"
|
||||
|
||||
@@ -4,8 +4,8 @@ import type {
|
||||
EntityClassGroup,
|
||||
EntitySchema,
|
||||
MikroORMOptions,
|
||||
} from "@mikro-orm/core"
|
||||
import { defineConfig } from "@mikro-orm/postgresql"
|
||||
} from "@medusajs/deps/mikro-orm/core"
|
||||
import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql"
|
||||
import { kebabCase } from "../common"
|
||||
import { CustomDBMigrator, CustomTsMigrationGenerator } from "../dal"
|
||||
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"
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,34 +28,23 @@
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@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/jest": "^0.2.36",
|
||||
"awilix": "^8.0.1",
|
||||
"expect-type": "^0.20.0",
|
||||
"jest": "^29.7.0",
|
||||
"pg": "^8.16.3",
|
||||
"rimraf": "^5.0.1",
|
||||
"typescript": "^5.6.2",
|
||||
"zod": "3.25.76"
|
||||
},
|
||||
"dependencies": {
|
||||
"@medusajs/deps": "2.10.3",
|
||||
"@medusajs/modules-sdk": "2.10.3",
|
||||
"@medusajs/orchestration": "2.10.3",
|
||||
"@medusajs/utils": "2.10.3",
|
||||
"ulid": "^2.3.0"
|
||||
},
|
||||
"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",
|
||||
"express": "^4.21.0",
|
||||
"pg": "^8.16.3"
|
||||
"express": "^4.21.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rimraf dist && tsc --build",
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
Modules,
|
||||
promiseAll,
|
||||
} from "@medusajs/utils"
|
||||
import { asValue } from "awilix"
|
||||
import { asValue } from "@medusajs/deps/awilix"
|
||||
import { setTimeout } from "timers/promises"
|
||||
import {
|
||||
createStep,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user