chore: dependecies reorg (#8535)

This commit is contained in:
Carlos R. L. Rodrigues
2024-08-23 07:16:04 -03:00
committed by GitHub
parent 59599ac237
commit 058378970a
126 changed files with 958 additions and 1266 deletions
-1
View File
@@ -88,7 +88,6 @@ module.exports = {
"./packages/cli/create-medusa-app/tsconfig.json", "./packages/cli/create-medusa-app/tsconfig.json",
"./packages/cli/medusa-cli/tsconfig.spec.json", "./packages/cli/medusa-cli/tsconfig.spec.json",
"./packages/cli/medusa-dev-cli/tsconfig.spec.json",
"./packages/cli/oas/medusa-oas-cli/tsconfig.spec.json", "./packages/cli/oas/medusa-oas-cli/tsconfig.spec.json",
"./packages/core/orchestration/tsconfig.json", "./packages/core/orchestration/tsconfig.json",
@@ -1,5 +1,6 @@
import { getMigrationPlanner, initialize } from "@medusajs/link-modules" import { getMigrationPlanner, initialize } from "@medusajs/link-modules"
import { MedusaModule, ModuleJoinerConfig } from "@medusajs/modules-sdk" import { MedusaModule } from "@medusajs/modules-sdk"
import { ModuleJoinerConfig } from "@medusajs/types"
import { medusaIntegrationTestRunner } from "medusa-test-utils" import { medusaIntegrationTestRunner } from "medusa-test-utils"
jest.setTimeout(5000000) jest.setTimeout(5000000)
@@ -1,7 +1,7 @@
import { MedusaContainer } from "@medusajs/modules-sdk"
import { import {
CreatePriceSetDTO, CreatePriceSetDTO,
IPricingModuleService, IPricingModuleService,
MedusaContainer,
PriceSetDTO, PriceSetDTO,
} from "@medusajs/types" } from "@medusajs/types"
import { Modules } from "@medusajs/utils" import { Modules } from "@medusajs/utils"
+1
View File
@@ -1,4 +1,5 @@
#!/usr/bin/env node #!/usr/bin/env node
try { try {
require("ts-node").register({}) require("ts-node").register({})
} catch {} } catch {}
+5 -5
View File
@@ -39,12 +39,10 @@
"typescript": "^5.3.3" "typescript": "^5.3.3"
}, },
"dependencies": { "dependencies": {
"@medusajs/utils": "^1.11.2", "@medusajs/utils": "^1.11.9",
"axios": "^0.21.4", "axios": "^0.21.4",
"chalk": "^4.0.0", "chalk": "^4.0.0",
"configstore": "5.0.1", "configstore": "5.0.1",
"core-js": "^3.6.5",
"dotenv": "^16.4.5",
"execa": "^5.1.1", "execa": "^5.1.1",
"fs-exists-cached": "^1.0.0", "fs-exists-cached": "^1.0.0",
"fs-extra": "^10.0.0", "fs-extra": "^10.0.0",
@@ -59,13 +57,15 @@
"pg": "^8.11.3", "pg": "^8.11.3",
"pg-god": "^1.0.12", "pg-god": "^1.0.12",
"prompts": "^2.4.2", "prompts": "^2.4.2",
"regenerator-runtime": "^0.13.11",
"resolve-cwd": "^3.0.0", "resolve-cwd": "^3.0.0",
"semver": "^7.3.8", "semver": "^7.3.8",
"stack-trace": "^0.0.10", "stack-trace": "^0.0.10",
"ulid": "^2.3.0",
"winston": "^3.8.2", "winston": "^3.8.2",
"yargs": "^15.3.1" "yargs": "^15.3.1"
}, },
"peerDependencies": {
"dotenv": "*",
"ulid": "*"
},
"gitHead": "81a7ff73d012fda722f6e9ef0bd9ba0232d37808" "gitHead": "81a7ff73d012fda722f6e9ef0bd9ba0232d37808"
} }
-2
View File
@@ -1,7 +1,5 @@
#!/usr/bin/env node #!/usr/bin/env node
import "core-js/stable"
import "regenerator-runtime/runtime"
import os from "os" import os from "os"
import util from "util" import util from "util"
import createCli from "./create-cli" import createCli from "./create-cli"
+1 -1
View File
@@ -37,7 +37,7 @@
}, },
"dependencies": { "dependencies": {
"@medusajs/medusa": "^1.20.4", "@medusajs/medusa": "^1.20.4",
"@medusajs/utils": "^1.11.8", "@medusajs/utils": "^1.11.9",
"@readme/json-schema-ref-parser": "^1.2.0", "@readme/json-schema-ref-parser": "^1.2.0",
"@readme/openapi-parser": "^2.4.0", "@readme/openapi-parser": "^2.4.0",
"@redocly/cli": "^1.7.0", "@redocly/cli": "^1.7.0",
+5 -2
View File
@@ -34,8 +34,11 @@
"@medusajs/orchestration": "^0.5.7", "@medusajs/orchestration": "^0.5.7",
"@medusajs/utils": "^1.11.9", "@medusajs/utils": "^1.11.9",
"@medusajs/workflows-sdk": "^0.1.6", "@medusajs/workflows-sdk": "^0.1.6",
"awilix": "^8.0.1", "json-2-csv": "^5.5.4"
"ulid": "^2.3.0" },
"peerDependencies": {
"awilix": "*",
"ulid": "*"
}, },
"scripts": { "scripts": {
"prepublishOnly": "cross-env NODE_ENV=production tsc --build", "prepublishOnly": "cross-env NODE_ENV=production tsc --build",
@@ -1,4 +1,5 @@
import { LinkDefinition, RemoteLink } from "@medusajs/modules-sdk" import { RemoteLink } from "@medusajs/modules-sdk"
import { LinkDefinition } from "@medusajs/types"
import { ContainerRegistrationKeys } from "@medusajs/utils" import { ContainerRegistrationKeys } from "@medusajs/utils"
import { createStep, StepResponse } from "@medusajs/workflows-sdk" import { createStep, StepResponse } from "@medusajs/workflows-sdk"
@@ -1,4 +1,5 @@
import { LinkDefinition, RemoteLink } from "@medusajs/modules-sdk" import { RemoteLink } from "@medusajs/modules-sdk"
import { LinkDefinition } from "@medusajs/types"
import { createStep, StepResponse } from "@medusajs/workflows-sdk" import { createStep, StepResponse } from "@medusajs/workflows-sdk"
import { ContainerRegistrationKeys } from "@medusajs/utils" import { ContainerRegistrationKeys } from "@medusajs/utils"
@@ -1,6 +1,7 @@
import { LinkDefinition, RemoteLink } from "@medusajs/modules-sdk" import { RemoteLink } from "@medusajs/modules-sdk"
import { LinkDefinition } from "@medusajs/types"
import { ContainerRegistrationKeys, MedusaError } from "@medusajs/utils" import { ContainerRegistrationKeys, MedusaError } from "@medusajs/utils"
import { createStep, StepResponse } from "@medusajs/workflows-sdk" import { StepResponse, createStep } from "@medusajs/workflows-sdk"
export const updateRemoteLinksStepId = "update-remote-links-step" export const updateRemoteLinksStepId = "update-remote-links-step"
export const updateRemoteLinksStep = createStep( export const updateRemoteLinksStep = createStep(
@@ -1,5 +1,4 @@
import { LinkDefinition } from "@medusajs/modules-sdk" import { BatchWorkflowInput, LinkDefinition } from "@medusajs/types"
import { BatchWorkflowInput } from "@medusajs/types"
import { import {
WorkflowData, WorkflowData,
WorkflowResponse, WorkflowResponse,
@@ -1,4 +1,4 @@
import { LinkDefinition } from "@medusajs/modules-sdk" import { LinkDefinition } from "@medusajs/types"
import { import {
WorkflowData, WorkflowData,
WorkflowResponse, WorkflowResponse,
@@ -1,4 +1,4 @@
import { LinkDefinition } from "@medusajs/modules-sdk" import { LinkDefinition } from "@medusajs/types"
import { import {
WorkflowData, WorkflowData,
WorkflowResponse, WorkflowResponse,
@@ -1,4 +1,4 @@
import { LinkDefinition } from "@medusajs/modules-sdk" import { LinkDefinition } from "@medusajs/types"
import { import {
WorkflowData, WorkflowData,
WorkflowResponse, WorkflowResponse,
@@ -1,11 +1,12 @@
import { import {
IFileModuleService,
HttpTypes, HttpTypes,
IFileModuleService,
IRegionModuleService, IRegionModuleService,
} from "@medusajs/types" } from "@medusajs/types"
import { ModuleRegistrationName, convertJsonToCsv } from "@medusajs/utils" import { ModuleRegistrationName } from "@medusajs/utils"
import { StepResponse, createStep } from "@medusajs/workflows-sdk" import { StepResponse, createStep } from "@medusajs/workflows-sdk"
import { normalizeForExport } from "../helpers/normalize-for-export" import { normalizeForExport } from "../helpers/normalize-for-export"
import { convertJsonToCsv } from "../utlils"
const prodColumnPositions = new Map([ const prodColumnPositions = new Map([
["Product Id", 0], ["Product Id", 0],
@@ -1,16 +1,13 @@
import {
MedusaError,
ModuleRegistrationName,
convertCsvToJson,
} from "@medusajs/utils"
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
import { normalizeForImport } from "../helpers/normalize-for-import"
import { import {
IProductModuleService, IProductModuleService,
IRegionModuleService, IRegionModuleService,
ISalesChannelModuleService, ISalesChannelModuleService,
} from "@medusajs/types" } from "@medusajs/types"
import { MedusaError, ModuleRegistrationName } from "@medusajs/utils"
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
import { normalizeForImport } from "../helpers/normalize-for-import"
import { normalizeV1Products } from "../helpers/normalize-v1-import" import { normalizeV1Products } from "../helpers/normalize-v1-import"
import { convertCsvToJson } from "../utlils"
export const parseProductCsvStepId = "parse-product-csv" export const parseProductCsvStepId = "parse-product-csv"
/** /**
@@ -1,10 +1,11 @@
import { LinkDefinition } from "@medusajs/modules-sdk"
import { import {
AdditionalData, AdditionalData,
InventoryTypes, InventoryTypes,
LinkDefinition,
PricingTypes, PricingTypes,
ProductTypes, ProductTypes,
} from "@medusajs/types" } from "@medusajs/types"
import { Modules } from "@medusajs/utils"
import { import {
WorkflowData, WorkflowData,
WorkflowResponse, WorkflowResponse,
@@ -18,7 +19,6 @@ import { createInventoryItemsWorkflow } from "../../inventory/workflows/create-i
import { createPriceSetsStep } from "../../pricing" import { createPriceSetsStep } from "../../pricing"
import { createProductVariantsStep } from "../steps/create-product-variants" import { createProductVariantsStep } from "../steps/create-product-variants"
import { createVariantPricingLinkStep } from "../steps/create-variant-pricing-link" import { createVariantPricingLinkStep } from "../steps/create-variant-pricing-link"
import { Modules } from "@medusajs/utils"
/** /**
* @privateRemarks * @privateRemarks
+2 -2
View File
@@ -1,8 +1,8 @@
export * as TestDatabaseUtils from "./database" export * as TestDatabaseUtils from "./database"
export * as TestEventUtils from "./events" export * as TestEventUtils from "./events"
export * as JestUtils from "./jest"
export { default as IdMap } from "./id-map" export { default as IdMap } from "./id-map"
export * from "./init-modules" export * from "./init-modules"
export * as JestUtils from "./jest"
export * from "./medusa-test-runner"
export { default as MockEventBusService } from "./mock-event-bus-service" export { default as MockEventBusService } from "./mock-event-bus-service"
export * from "./module-test-runner" export * from "./module-test-runner"
export * from "./medusa-test-runner"
@@ -3,9 +3,9 @@ import {
ModulesSdkUtils, ModulesSdkUtils,
toMikroOrmEntities, toMikroOrmEntities,
} from "@medusajs/utils" } from "@medusajs/utils"
import { MockEventBusService } from "." import { TestDatabase, getDatabaseURL, getMikroOrmWrapper } from "./database"
import { getDatabaseURL, getMikroOrmWrapper, TestDatabase } from "./database" import { InitModulesOptions, initModules } from "./init-modules"
import { initModules, InitModulesOptions } from "./init-modules" import { default as MockEventBusService } from "./mock-event-bus-service"
export interface SuiteOptions<TService = unknown> { export interface SuiteOptions<TService = unknown> {
MikroOrmWrapper: TestDatabase MikroOrmWrapper: TestDatabase
+3 -2
View File
@@ -32,11 +32,12 @@
"@graphql-tools/schema": "^10.0.0", "@graphql-tools/schema": "^10.0.0",
"@medusajs/orchestration": "^0.5.7", "@medusajs/orchestration": "^0.5.7",
"@medusajs/utils": "^1.11.9", "@medusajs/utils": "^1.11.9",
"awilix": "^8.0.0",
"graphql": "^16.6.0", "graphql": "^16.6.0",
"knex": "2.4.2",
"resolve-cwd": "^3.0.0" "resolve-cwd": "^3.0.0"
}, },
"peerDependencies": {
"awilix": "*"
},
"scripts": { "scripts": {
"prepublishOnly": "cross-env NODE_ENV=production tsc --build", "prepublishOnly": "cross-env NODE_ENV=production tsc --build",
"build": "rimraf dist && tsc --build", "build": "rimraf dist && tsc --build",
-1
View File
@@ -1,4 +1,3 @@
export * from "@medusajs/types/dist/modules-sdk"
export * from "./definitions" export * from "./definitions"
export * from "./loaders" export * from "./loaders"
export * from "./medusa-app" export * from "./medusa-app"
+5 -5
View File
@@ -20,17 +20,17 @@ import {
} from "@medusajs/types" } from "@medusajs/types"
import { import {
ContainerRegistrationKeys, ContainerRegistrationKeys,
createMedusaContainer,
isObject,
isString,
MedusaError, MedusaError,
ModuleRegistrationName, ModuleRegistrationName,
Modules, Modules,
ModulesSdkUtils, ModulesSdkUtils,
createMedusaContainer,
isObject,
isString,
promiseAll, promiseAll,
} from "@medusajs/utils" } from "@medusajs/utils"
import type { Knex } from "@mikro-orm/knex"
import { asValue } from "awilix" import { asValue } from "awilix"
import type { Knex } from "knex"
import { MODULE_PACKAGE_NAMES } from "./definitions" import { MODULE_PACKAGE_NAMES } from "./definitions"
import { import {
MedusaModule, MedusaModule,
@@ -39,8 +39,8 @@ import {
} from "./medusa-module" } from "./medusa-module"
import { RemoteLink } from "./remote-link" import { RemoteLink } from "./remote-link"
import { RemoteQuery } from "./remote-query" import { RemoteQuery } from "./remote-query"
import { cleanGraphQLSchema } from "./utils"
import { MODULE_RESOURCE_TYPE, MODULE_SCOPE } from "./types" import { MODULE_RESOURCE_TYPE, MODULE_SCOPE } from "./types"
import { cleanGraphQLSchema } from "./utils"
const LinkModulePackage = MODULE_PACKAGE_NAMES[Modules.LINK] const LinkModulePackage = MODULE_PACKAGE_NAMES[Modules.LINK]
+1 -14
View File
@@ -1,5 +1,6 @@
import { import {
ILinkModule, ILinkModule,
LinkDefinition,
LoadedModule, LoadedModule,
ModuleJoinerRelationship, ModuleJoinerRelationship,
} from "@medusajs/types" } from "@medusajs/types"
@@ -20,20 +21,6 @@ export type DeleteEntityInput = {
} }
export type RestoreEntityInput = DeleteEntityInput export type RestoreEntityInput = DeleteEntityInput
/**
* A link for two records of linked data models.
*
* The keys are the names of each module, and their value is an object that holds the ID of the linked data model's record.
*/
export type LinkDefinition = {
[moduleName: string]: {
// TODO: changing this to any temporarily as the "data" attribute is not being picked up correctly
[fieldName: string]: any
}
} & {
data?: Record<string, unknown>
}
type RemoteRelationship = ModuleJoinerRelationship & { type RemoteRelationship = ModuleJoinerRelationship & {
isPrimary: boolean isPrimary: boolean
isForeign: boolean isForeign: boolean
@@ -1,6 +1,5 @@
import { LoadedModule } from "@medusajs/types" import { LinkDefinition, LoadedModule } from "@medusajs/types"
import { isPresent } from "@medusajs/utils" import { isPresent } from "@medusajs/utils"
import { LinkDefinition } from "../remote-link"
export const convertRecordsToLinkDefinition = ( export const convertRecordsToLinkDefinition = (
links: object[], links: object[],
+4 -2
View File
@@ -20,17 +20,19 @@
"author": "Medusa", "author": "Medusa",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@medusajs/types": "^1.11.16",
"cross-env": "^5.2.1", "cross-env": "^5.2.1",
"jest": "^29.7.0", "jest": "^29.7.0",
"rimraf": "^5.0.1", "rimraf": "^5.0.1",
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },
"dependencies": { "dependencies": {
"@medusajs/types": "^1.11.16",
"@medusajs/utils": "^1.11.9", "@medusajs/utils": "^1.11.9",
"awilix": "^8.0.0",
"graphql": "^16.6.0" "graphql": "^16.6.0"
}, },
"peerDependencies": {
"awilix": "*"
},
"scripts": { "scripts": {
"prepublishOnly": "cross-env NODE_ENV=production tsc --build", "prepublishOnly": "cross-env NODE_ENV=production tsc --build",
"build": "rimraf dist && tsc --build", "build": "rimraf dist && tsc --build",
@@ -2,12 +2,13 @@ import { isDefined } from "@medusajs/utils"
import { EventEmitter } from "events" import { EventEmitter } from "events"
import { IDistributedTransactionStorage } from "./datastore/abstract-storage" import { IDistributedTransactionStorage } from "./datastore/abstract-storage"
import { BaseInMemoryDistributedTransactionStorage } from "./datastore/base-in-memory-storage" import { BaseInMemoryDistributedTransactionStorage } from "./datastore/base-in-memory-storage"
import { TransactionOrchestrator } from "./transaction-orchestrator"
import { TransactionStep, TransactionStepHandler } from "./transaction-step"
import { import {
TransactionFlow, TransactionFlow,
TransactionOrchestrator, TransactionHandlerType,
} from "./transaction-orchestrator" TransactionState,
import { TransactionStep, TransactionStepHandler } from "./transaction-step" } from "./types"
import { TransactionHandlerType, TransactionState } from "./types"
/** /**
* @typedef TransactionMetadata * @typedef TransactionMetadata
@@ -8,6 +8,7 @@ import { TransactionStep, TransactionStepHandler } from "./transaction-step"
import { import {
DistributedTransactionEvent, DistributedTransactionEvent,
StepFeatures, StepFeatures,
TransactionFlow,
TransactionHandlerType, TransactionHandlerType,
TransactionModelOptions, TransactionModelOptions,
TransactionOptions, TransactionOptions,
@@ -27,29 +28,6 @@ import {
TransactionTimeoutError, TransactionTimeoutError,
} from "./errors" } from "./errors"
export type TransactionFlow = {
modelId: string
options?: TransactionModelOptions
definition: TransactionStepsDefinition
transactionId: string
metadata?: {
eventGroupId?: string
[key: string]: unknown
}
hasAsyncSteps: boolean
hasFailedSteps: boolean
hasSkippedOnFailureSteps: boolean
hasWaitingSteps: boolean
hasSkippedSteps: boolean
hasRevertedSteps: boolean
timedOutAt: number | null
startedAt?: number
state: TransactionState
steps: {
[key: string]: TransactionStep
}
}
/** /**
* @class TransactionOrchestrator is responsible for managing and executing distributed transactions. * @class TransactionOrchestrator is responsible for managing and executing distributed transactions.
* It is based on a single transaction definition, which is used to execute all the transaction steps * It is based on a single transaction definition, which is used to execute all the transaction steps
@@ -1,3 +1,4 @@
import { TransactionState } from "@medusajs/utils"
import { DistributedTransactionType } from "./distributed-transaction" import { DistributedTransactionType } from "./distributed-transaction"
import { TransactionStep } from "./transaction-step" import { TransactionStep } from "./transaction-step"
export { export {
@@ -228,3 +229,26 @@ export type StepFeatures = {
} }
export type TransactionOptions = TransactionModelOptions & StepFeatures export type TransactionOptions = TransactionModelOptions & StepFeatures
export type TransactionFlow = {
modelId: string
options?: TransactionModelOptions
definition: TransactionStepsDefinition
transactionId: string
metadata?: {
eventGroupId?: string
[key: string]: unknown
}
hasAsyncSteps: boolean
hasFailedSteps: boolean
hasSkippedOnFailureSteps: boolean
hasWaitingSteps: boolean
hasSkippedSteps: boolean
hasRevertedSteps: boolean
timedOutAt: number | null
startedAt?: number
state: TransactionState
steps: {
[key: string]: TransactionStep
}
}
+1 -1
View File
@@ -21,7 +21,7 @@
"author": "Medusa", "author": "Medusa",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"awilix": "^8.0.0", "awilix": "^8.0.1",
"bignumber.js": "^9.1.2", "bignumber.js": "^9.1.2",
"cross-env": "^5.2.1", "cross-env": "^5.2.1",
"ioredis": "^5.4.1", "ioredis": "^5.4.1",
-6
View File
@@ -1,10 +1,5 @@
import { CamelCase, Prettify } from "../common" import { CamelCase, Prettify } from "../common"
/**
* Symbol to identify a DML entity from an object
*/
export const IsDmlEntity = Symbol.for("isDmlEntity")
/** /**
* Representation of DML schema. It must be a key-value pair * Representation of DML schema. It must be a key-value pair
* with string based keys and properties/relationships * with string based keys and properties/relationships
@@ -33,7 +28,6 @@ export interface IDmlEntity<
Schema extends DMLSchema, Schema extends DMLSchema,
Config extends IDmlEntityConfig Config extends IDmlEntityConfig
> { > {
[IsDmlEntity]: true
name: InferDmlEntityNameFromConfig<Config> name: InferDmlEntityNameFromConfig<Config>
schema: Schema schema: Schema
} }
@@ -165,6 +165,20 @@ export type LinkModulesExtraFields = Record<
} }
> >
/**
* A link for two records of linked data models.
*
* The keys are the names of each module, and their value is an object that holds the ID of the linked data model's record.
*/
export type LinkDefinition = {
[moduleName: string]: {
// TODO: changing this to any temporarily as the "data" attribute is not being picked up correctly
[fieldName: string]: any
}
} & {
data?: Record<string, unknown>
}
export type ModuleJoinerConfig = Omit< export type ModuleJoinerConfig = Omit<
JoinerServiceConfig, JoinerServiceConfig,
"serviceName" | "primaryKeys" | "relationships" | "extends" "serviceName" | "primaryKeys" | "relationships" | "extends"
-2
View File
@@ -39,9 +39,7 @@
"bignumber.js": "^9.1.2", "bignumber.js": "^9.1.2",
"dotenv": "^16.4.5", "dotenv": "^16.4.5",
"dotenv-expand": "^11.0.6", "dotenv-expand": "^11.0.6",
"json-2-csv": "^5.5.4",
"jsonwebtoken": "^9.0.2", "jsonwebtoken": "^9.0.2",
"knex": "2.4.2",
"pluralize": "^8.0.0", "pluralize": "^8.0.0",
"ulid": "^2.3.0" "ulid": "^2.3.0"
}, },
@@ -1,14 +0,0 @@
import { join } from "path"
export const getMedusaVersion = (): string => {
try {
return require(join(
process.cwd(),
`node_modules`,
`@medusajs/medusa`,
`package.json`
)).version
} catch (e) {
return ``
}
}
@@ -25,12 +25,12 @@ import {
} from "@mikro-orm/core/typings" } from "@mikro-orm/core/typings"
import { SqlEntityManager } from "@mikro-orm/postgresql" import { SqlEntityManager } from "@mikro-orm/postgresql"
import { import {
MedusaError,
arrayDifference, arrayDifference,
isString, isString,
MedusaError,
promiseAll, promiseAll,
} from "../../common" } from "../../common"
import { buildQuery } from "../../modules-sdk" import { buildQuery } from "../../modules-sdk/build-query"
import { import {
getSoftDeletedCascadedEntitiesIdsMappedBy, getSoftDeletedCascadedEntitiesIdsMappedBy,
transactionWrapper, transactionWrapper,
@@ -1,6 +1,6 @@
import { EntityMetadata, FindOptions, wrap } from "@mikro-orm/core" import { EntityMetadata, FindOptions, wrap } from "@mikro-orm/core"
import { SqlEntityManager } from "@mikro-orm/postgresql" import { SqlEntityManager } from "@mikro-orm/postgresql"
import { buildQuery } from "../../modules-sdk" import { buildQuery } from "../../modules-sdk/build-query"
function detectCircularDependency( function detectCircularDependency(
manager: SqlEntityManager, manager: SqlEntityManager,
+3 -2
View File
@@ -6,13 +6,14 @@ import {
IDmlEntity, IDmlEntity,
IDmlEntityConfig, IDmlEntityConfig,
InferDmlEntityNameFromConfig, InferDmlEntityNameFromConfig,
IsDmlEntity,
QueryCondition, QueryCondition,
} from "@medusajs/types" } from "@medusajs/types"
import { isObject, isString, toCamelCase } from "../common" import { isObject, isString, toCamelCase } from "../common"
import { transformIndexWhere } from "./helpers/entity-builder/build-indexes" import { transformIndexWhere } from "./helpers/entity-builder/build-indexes"
import { BelongsTo } from "./relations/belongs-to" import { BelongsTo } from "./relations/belongs-to"
const IsDmlEntity = Symbol.for("isDmlEntity")
function extractNameAndTableName<const Config extends IDmlEntityConfig>( function extractNameAndTableName<const Config extends IDmlEntityConfig>(
nameOrConfig: Config nameOrConfig: Config
) { ) {
@@ -59,7 +60,7 @@ export class DmlEntity<
const TConfig extends IDmlEntityConfig const TConfig extends IDmlEntityConfig
> implements IDmlEntity<Schema, TConfig> > implements IDmlEntity<Schema, TConfig>
{ {
[IsDmlEntity]: true = true [IsDmlEntity] = true
name: InferDmlEntityNameFromConfig<TConfig> name: InferDmlEntityNameFromConfig<TConfig>
schema: Schema schema: Schema
+1 -2
View File
@@ -1,7 +1,7 @@
export * from "./common"
export * from "./api-key" export * from "./api-key"
export * from "./auth" export * from "./auth"
export * from "./bundles" export * from "./bundles"
export * from "./common"
export * from "./dal" export * from "./dal"
export * from "./decorators" export * from "./decorators"
export * from "./defaults" export * from "./defaults"
@@ -26,6 +26,5 @@ export * from "./shipping"
export * from "./totals" export * from "./totals"
export * from "./totals/big-number" export * from "./totals/big-number"
export * from "./user" export * from "./user"
export * from "./csv"
export const MedusaModuleType = Symbol.for("MedusaModule") export const MedusaModuleType = Symbol.for("MedusaModule")
+1 -1
View File
@@ -1,4 +1,4 @@
import { Modules } from "../modules-sdk" import { Modules } from "../modules-sdk/definition"
import { composeLinkName } from "./compose-link-name" import { composeLinkName } from "./compose-link-name"
export const LINKS = { export const LINKS = {
+3 -3
View File
@@ -1,13 +1,13 @@
import { EventEmitter } from "events" import { MikroORM, MikroORMOptions } from "@mikro-orm/core"
import { import {
MigrateOptions, MigrateOptions,
MigrationResult, MigrationResult,
UmzugMigration, UmzugMigration,
} from "@mikro-orm/migrations" } from "@mikro-orm/migrations"
import { MikroORM, MikroORMOptions } from "@mikro-orm/core"
import { PostgreSqlDriver } from "@mikro-orm/postgresql" import { PostgreSqlDriver } from "@mikro-orm/postgresql"
import { dirname } from "path" import { EventEmitter } from "events"
import { access, mkdir, writeFile } from "fs/promises" import { access, mkdir, writeFile } from "fs/promises"
import { dirname } from "path"
/** /**
* Events emitted by the migrations class * Events emitted by the migrations class
@@ -1,7 +1,7 @@
import { DAL, FindConfig } from "@medusajs/types" import { DAL, FindConfig } from "@medusajs/types"
import { deduplicate, isDefined, isObject } from "../common" import { deduplicate, isDefined, isObject } from "../common"
import { SoftDeletableFilterKey } from "../dal" import { SoftDeletableFilterKey } from "../dal/mikro-orm/mikro-orm-soft-deletable-filter"
// Following convention here is fine, we can make it configurable if needed. // Following convention here is fine, we can make it configurable if needed.
const DELETED_AT_FIELD_NAME = "deleted_at" const DELETED_AT_FIELD_NAME = "deleted_at"
@@ -1,6 +1,6 @@
import { LinkModulesExtraFields, ModuleJoinerConfig } from "@medusajs/types" import { LinkModulesExtraFields, ModuleJoinerConfig } from "@medusajs/types"
import { camelToSnakeCase, isObject, pluralize, toPascalCase } from "../common" import { camelToSnakeCase, isObject, pluralize, toPascalCase } from "../common"
import { composeLinkName } from "../link" import { composeLinkName } from "../link/compose-link-name"
export const DefineLinkSymbol = Symbol.for("DefineLink") export const DefineLinkSymbol = Symbol.for("DefineLink")
@@ -11,16 +11,18 @@ import {
SoftDeleteReturn, SoftDeleteReturn,
} from "@medusajs/types" } from "@medusajs/types"
import { import {
MapToConfig,
isString, isString,
kebabCase, kebabCase,
lowerCaseFirst, lowerCaseFirst,
mapObjectTo, mapObjectTo,
MapToConfig,
pluralize, pluralize,
upperCaseFirst, upperCaseFirst,
} from "../common" } from "../common"
import { DmlEntity } from "../dml"
import { InjectManager, MedusaContext } from "./decorators" import { InjectManager, MedusaContext } from "./decorators"
import { ModuleRegistrationName } from "./definition" import { ModuleRegistrationName } from "./definition"
import { buildModelsNameToLinkableKeysMap } from "./joiner-config-builder"
import { import {
BaseMethods, BaseMethods,
ExtractKeysFromConfig, ExtractKeysFromConfig,
@@ -29,8 +31,6 @@ import {
ModelEntries, ModelEntries,
ModelsConfigTemplate, ModelsConfigTemplate,
} from "./types/medusa-service" } from "./types/medusa-service"
import { buildModelsNameToLinkableKeysMap } from "./joiner-config-builder"
import { DmlEntity } from "../dml"
const readMethods = ["retrieve", "list", "listAndCount"] as BaseMethods[] const readMethods = ["retrieve", "list", "listAndCount"] as BaseMethods[]
const writeMethods = [ const writeMethods = [
@@ -55,12 +55,12 @@ function buildMethodNamesFromModel(
if (method === "retrieve") { if (method === "retrieve") {
normalizedModelName = normalizedModelName =
"singular" in model && model.singular model && "singular" in model && model.singular
? model.singular ? model.singular
: defaultMethodName : defaultMethodName
} else { } else {
normalizedModelName = normalizedModelName =
"plural" in model && model.plural model && "plural" in model && model.plural
? model.plural ? model.plural
: pluralize(defaultMethodName) : pluralize(defaultMethodName)
} }
+5 -3
View File
@@ -30,9 +30,11 @@
"dependencies": { "dependencies": {
"@medusajs/modules-sdk": "^1.12.11", "@medusajs/modules-sdk": "^1.12.11",
"@medusajs/orchestration": "^0.5.7", "@medusajs/orchestration": "^0.5.7",
"@medusajs/utils": "^1.11.9", "@medusajs/utils": "^1.11.9"
"awilix": "^8.0.1", },
"ulid": "^2.3.0" "peerDependencies": {
"awilix": "*",
"ulid": "*"
}, },
"scripts": { "scripts": {
"prepublishOnly": "cross-env NODE_ENV=production tsc --build", "prepublishOnly": "cross-env NODE_ENV=production tsc --build",
@@ -16,7 +16,7 @@ import {
import { EOL } from "os" import { EOL } from "os"
import { ulid } from "ulid" import { ulid } from "ulid"
import { MedusaWorkflow } from "../medusa-workflow" import { MedusaWorkflow } from "../medusa-workflow"
import { resolveValue } from "../utils/composer" import { resolveValue } from "../utils/composer/helpers/resolve-value"
import { import {
ExportedWorkflow, ExportedWorkflow,
FlowCancelOptions, FlowCancelOptions,
@@ -4,19 +4,19 @@ import {
WorkflowManager, WorkflowManager,
} from "@medusajs/orchestration" } from "@medusajs/orchestration"
import { LoadedModule, MedusaContainer } from "@medusajs/types" import { LoadedModule, MedusaContainer } from "@medusajs/types"
import { isString, OrchestrationUtils } from "@medusajs/utils" import { OrchestrationUtils, isString } from "@medusajs/utils"
import { exportWorkflow } from "../../helper" import { exportWorkflow } from "../../helper"
import { createStep } from "./create-step" import { createStep } from "./create-step"
import { StepResponse } from "./helpers"
import { proxify } from "./helpers/proxy" import { proxify } from "./helpers/proxy"
import { StepResponse } from "./helpers/step-response"
import { WorkflowResponse } from "./helpers/workflow-response"
import { import {
CreateWorkflowComposerContext, CreateWorkflowComposerContext,
HookHandler,
ReturnWorkflow, ReturnWorkflow,
StepFunction, StepFunction,
WorkflowData, WorkflowData,
HookHandler,
} from "./type" } from "./type"
import { WorkflowResponse } from "./helpers/workflow-response"
global[OrchestrationUtils.SymbolMedusaWorkflowComposerContext] = null global[OrchestrationUtils.SymbolMedusaWorkflowComposerContext] = null
+4 -2
View File
@@ -39,6 +39,7 @@
"test:integration": "jest --forceExit -- integration-tests/**/__tests__/**/*.ts" "test:integration": "jest --forceExit -- integration-tests/**/__tests__/**/*.ts"
}, },
"devDependencies": { "devDependencies": {
"@medusajs/orchestration": "^0.5.7",
"@medusajs/types": "^1.11.16", "@medusajs/types": "^1.11.16",
"@types/express": "^4.17.17", "@types/express": "^4.17.17",
"@types/jsonwebtoken": "^8.5.9", "@types/jsonwebtoken": "^8.5.9",
@@ -52,10 +53,8 @@
"dependencies": { "dependencies": {
"@medusajs/medusa-cli": "^1.3.22", "@medusajs/medusa-cli": "^1.3.22",
"@medusajs/modules-sdk": "^1.12.11", "@medusajs/modules-sdk": "^1.12.11",
"@medusajs/orchestration": "^0.5.7",
"@medusajs/utils": "^1.11.9", "@medusajs/utils": "^1.11.9",
"@medusajs/workflows-sdk": "^0.1.6", "@medusajs/workflows-sdk": "^0.1.6",
"awilix": "^8.0.0",
"cookie-parser": "^1.4.6", "cookie-parser": "^1.4.6",
"cors": "^2.8.5", "cors": "^2.8.5",
"express": "^4.18.2", "express": "^4.18.2",
@@ -66,5 +65,8 @@
"medusa-telemetry": "^0.0.17", "medusa-telemetry": "^0.0.17",
"morgan": "^1.9.1", "morgan": "^1.9.1",
"zod": "3.22.4" "zod": "3.22.4"
},
"peerDependencies": {
"awilix": "*"
} }
} }
+9 -7
View File
@@ -1,11 +1,13 @@
export * from "./config" export * from "./config"
export * from "./logger"
export * from "./http"
export * from "./database"
export * from "./container" export * from "./container"
export * from "./subscribers" export * from "./database"
export * from "./links"
export * from "./jobs"
export * from "./feature-flags" export * from "./feature-flags"
export * from "./workflows" export * from "./http"
export * from "./jobs"
export * from "./links"
export * from "./logger"
export * from "./medusa-app-loader" export * from "./medusa-app-loader"
export * from "./subscribers"
export * from "./workflows"
export const MEDUSA_CLI_PATH = require.resolve("@medusajs/medusa-cli")
@@ -1,4 +1,4 @@
import { import type {
IDistributedSchedulerStorage, IDistributedSchedulerStorage,
SchedulerOptions, SchedulerOptions,
} from "@medusajs/orchestration" } from "@medusajs/orchestration"
@@ -1,14 +1,14 @@
import type { SchedulerOptions } from "@medusajs/orchestration"
import { MedusaContainer } from "@medusajs/types"
import { isObject, MedusaError, promiseAll } from "@medusajs/utils"
import { import {
createStep, createStep,
createWorkflow, createWorkflow,
StepResponse, StepResponse,
} from "@medusajs/workflows-sdk" } from "@medusajs/workflows-sdk"
import { isObject, MedusaError, promiseAll } from "@medusajs/utils"
import { SchedulerOptions } from "@medusajs/orchestration"
import { MedusaContainer } from "@medusajs/types"
import { logger } from "../logger"
import { access, readdir } from "fs/promises" import { access, readdir } from "fs/promises"
import { join } from "path" import { join } from "path"
import { logger } from "../logger"
type CronJobConfig = { type CronJobConfig = {
name: string name: string
+3 -12
View File
@@ -41,20 +41,19 @@
"serve": "node dist/app.js", "serve": "node dist/app.js",
"test": "jest --silent --bail --maxWorkers=50% --forceExit" "test": "jest --silent --bail --maxWorkers=50% --forceExit"
}, },
"peerDependencies": {
"awilix": "*"
},
"dependencies": { "dependencies": {
"@inquirer/checkbox": "^2.3.11", "@inquirer/checkbox": "^2.3.11",
"@medusajs/admin-sdk": "0.0.1", "@medusajs/admin-sdk": "0.0.1",
"@medusajs/core-flows": "^0.0.9", "@medusajs/core-flows": "^0.0.9",
"@medusajs/framework": "^0.0.1", "@medusajs/framework": "^0.0.1",
"@medusajs/link-modules": "^0.2.11", "@medusajs/link-modules": "^0.2.11",
"@medusajs/medusa-cli": "^1.3.22",
"@medusajs/modules-sdk": "^1.12.11",
"@medusajs/orchestration": "^0.5.7",
"@medusajs/utils": "^1.11.9", "@medusajs/utils": "^1.11.9",
"@medusajs/workflows-sdk": "^0.1.6", "@medusajs/workflows-sdk": "^0.1.6",
"@swc/core": "1.5.7", "@swc/core": "1.5.7",
"@swc/helpers": "^0.5.11", "@swc/helpers": "^0.5.11",
"awilix": "^8.0.0",
"body-parser": "^1.19.0", "body-parser": "^1.19.0",
"boxen": "^5.0.1", "boxen": "^5.0.1",
"chalk": "^4.0.0", "chalk": "^4.0.0",
@@ -62,9 +61,7 @@
"compression": "^1.7.4", "compression": "^1.7.4",
"connect-redis": "^5.0.0", "connect-redis": "^5.0.0",
"cookie-parser": "^1.4.6", "cookie-parser": "^1.4.6",
"core-js": "^3.6.5",
"cors": "^2.8.5", "cors": "^2.8.5",
"dotenv": "^16.4.5",
"express": "^4.18.2", "express": "^4.18.2",
"express-session": "^1.17.3", "express-session": "^1.17.3",
"fs-exists-cached": "^1.0.0", "fs-exists-cached": "^1.0.0",
@@ -76,13 +73,7 @@
"morgan": "^1.9.1", "morgan": "^1.9.1",
"multer": "^1.4.5-lts.1", "multer": "^1.4.5-lts.1",
"node-schedule": "^2.1.1", "node-schedule": "^2.1.1",
"passport": "^0.6.0",
"passport-custom": "^1.1.1",
"passport-jwt": "^4.0.1",
"passport-local": "^1.0.0",
"qs": "^6.11.2", "qs": "^6.11.2",
"reflect-metadata": "^0.1.13",
"regenerator-runtime": "^0.13.11",
"request-ip": "^3.3.0", "request-ip": "^3.3.0",
"uuid": "^9.0.0", "uuid": "^9.0.0",
"zod": "3.22.4" "zod": "3.22.4"
@@ -1,7 +1,7 @@
import { LinkDefinition } from "@medusajs/modules-sdk"
import { import {
BatchMethodResponse, BatchMethodResponse,
HttpTypes, HttpTypes,
LinkDefinition,
MedusaContainer, MedusaContainer,
PriceDTO, PriceDTO,
ProductDTO, ProductDTO,
@@ -1,24 +1,23 @@
import {
AuthenticatedMedusaRequest,
MedusaResponse,
} from "../../../../../../types/routing"
import { import {
deleteCustomerAddressesWorkflow, deleteCustomerAddressesWorkflow,
updateCustomerAddressesWorkflow, updateCustomerAddressesWorkflow,
} from "@medusajs/core-flows" } from "@medusajs/core-flows"
import {
AuthenticatedMedusaRequest,
MedusaResponse,
} from "../../../../../../types/routing"
import { DeleteResponse, HttpTypes, MedusaContainer } from "@medusajs/types"
import { import {
ContainerRegistrationKeys, ContainerRegistrationKeys,
MedusaError, MedusaError,
remoteQueryObjectFromString, remoteQueryObjectFromString,
} from "@medusajs/utils" } from "@medusajs/utils"
import { MedusaContainer } from "@medusajs/modules-sdk" import { refetchCustomer } from "../../../helpers"
import { import {
StoreGetCustomerAddressParamsType, StoreGetCustomerAddressParamsType,
StoreUpdateCustomerAddressType, StoreUpdateCustomerAddressType,
} from "../../../validators" } from "../../../validators"
import { refetchCustomer } from "../../../helpers"
import { DeleteResponse, HttpTypes } from "@medusajs/types"
export const GET = async ( export const GET = async (
req: AuthenticatedMedusaRequest<StoreGetCustomerAddressParamsType>, req: AuthenticatedMedusaRequest<StoreGetCustomerAddressParamsType>,
+2 -7
View File
@@ -5,7 +5,7 @@ import Store from "medusa-telemetry/dist/store"
import { EOL } from "os" import { EOL } from "os"
import path from "path" import path from "path"
import { logger } from "@medusajs/framework" import { logger, MEDUSA_CLI_PATH } from "@medusajs/framework"
const defaultConfig = { const defaultConfig = {
padding: 5, padding: 5,
@@ -27,12 +27,7 @@ export default async function ({ port, directory }) {
* Re-constructing the path to Medusa CLI to execute the * Re-constructing the path to Medusa CLI to execute the
* start command. * start command.
*/ */
const cliPath = path.resolve( const cliPath = path.resolve(MEDUSA_CLI_PATH, "..", "..", "cli.js")
require.resolve("@medusajs/medusa-cli"),
"..",
"..",
"cli.js"
)
const devServer = { const devServer = {
childProcess: null as ChildProcess | null, childProcess: null as ChildProcess | null,
@@ -1,15 +1,12 @@
import "core-js/stable"
import "regenerator-runtime/runtime"
import cluster from "cluster" import cluster from "cluster"
import express from "express" import express from "express"
import { track } from "medusa-telemetry" import { track } from "medusa-telemetry"
import { scheduleJob } from "node-schedule" import { scheduleJob } from "node-schedule"
import os from "os" import os from "os"
import loaders from "../loaders"
import { logger } from "@medusajs/framework" import { logger } from "@medusajs/framework"
import { GracefulShutdownServer, isPresent } from "@medusajs/utils" import { GracefulShutdownServer, isPresent } from "@medusajs/utils"
import loaders from "../loaders"
const EVERY_SIXTH_HOUR = "0 */6 * * *" const EVERY_SIXTH_HOUR = "0 */6 * * *"
const CRON_SCHEDULE = EVERY_SIXTH_HOUR const CRON_SCHEDULE = EVERY_SIXTH_HOUR
+1 -4
View File
@@ -1,13 +1,10 @@
import "core-js/stable"
import "regenerator-runtime/runtime"
import express from "express" import express from "express"
import { track } from "medusa-telemetry" import { track } from "medusa-telemetry"
import { scheduleJob } from "node-schedule" import { scheduleJob } from "node-schedule"
import loaders from "../loaders"
import { logger } from "@medusajs/framework" import { logger } from "@medusajs/framework"
import { GracefulShutdownServer } from "@medusajs/utils" import { GracefulShutdownServer } from "@medusajs/utils"
import loaders from "../loaders"
const EVERY_SIXTH_HOUR = "0 */6 * * *" const EVERY_SIXTH_HOUR = "0 */6 * * *"
const CRON_SCHEDULE = EVERY_SIXTH_HOUR const CRON_SCHEDULE = EVERY_SIXTH_HOUR
+1 -4
View File
@@ -1,12 +1,9 @@
import "core-js/stable"
import "regenerator-runtime/runtime"
import express from "express" import express from "express"
import { track } from "medusa-telemetry" import { track } from "medusa-telemetry"
import { logger } from "@medusajs/framework"
import { ModuleRegistrationName } from "@medusajs/utils" import { ModuleRegistrationName } from "@medusajs/utils"
import loaders from "../loaders" import loaders from "../loaders"
import { logger } from "@medusajs/framework"
export default async function ({ export default async function ({
directory, directory,
@@ -1,160 +0,0 @@
import { MedusaModule, registerMedusaModule } from "@medusajs/modules-sdk"
import glob from "glob"
import { isDefined } from "@medusajs/utils"
export function getInternalModules(configModule) {
const modules = []
const moduleResolutions = {}
Object.entries(configModule.modules ?? {}).forEach(([moduleKey, module]) => {
moduleResolutions[moduleKey] = registerMedusaModule(moduleKey, module)[
moduleKey
]
})
for (const moduleResolution of Object.values(moduleResolutions)) {
if (
!moduleResolution.resolutionPath ||
moduleResolution.moduleDeclaration.scope !== "internal"
) {
continue
}
let loadedModule = null
try {
loadedModule = require(moduleResolution.resolutionPath).default
} catch (error) {
console.log("Error loading Module", error)
continue
}
modules.push({
moduleDeclaration: moduleResolution.moduleDeclaration,
loadedModule,
})
}
return modules
}
export const getEnabledMigrations = (migrationDirs, isFlagEnabled) => {
const allMigrations = migrationDirs.flatMap((dir) => {
return glob.sync(dir)
})
return allMigrations
.map((file) => {
const loaded = require(file)
if (!isDefined(loaded.featureFlag) || isFlagEnabled(loaded.featureFlag)) {
delete loaded.featureFlag
return Object.values(loaded)
}
})
.flat()
.filter(Boolean)
}
export const getModuleMigrations = (configModule, isFlagEnabled) => {
const loadedModules = getInternalModules(configModule)
const allModules = []
for (const loadedModule of loadedModules) {
const mod = loadedModule.loadedModule
const moduleMigrations = (mod.migrations ?? [])
.map((migration) => {
if (
!isDefined(migration.featureFlag) ||
isFlagEnabled(migration.featureFlag)
) {
delete migration.featureFlag
return Object.values(migration)
}
})
.flat()
.filter(Boolean)
allModules.push({
moduleDeclaration: loadedModule.moduleDeclaration,
models: mod.models ?? [],
migrations: moduleMigrations,
})
}
return allModules
}
export const getModuleSharedResources = (configModule, featureFlagsRouter) => {
const isFlagEnabled = (flag) =>
featureFlagsRouter && featureFlagsRouter.isFeatureEnabled(flag)
const loadedModules = getModuleMigrations(configModule, isFlagEnabled)
let migrations = []
let models = []
for (const mod of loadedModules) {
if (mod.moduleDeclaration.resources !== "shared") {
continue
}
migrations = migrations.concat(mod.migrations)
models = models.concat(mod.models ?? [])
}
return {
models,
migrations,
}
}
export const runIsolatedModulesMigration = async (configModule) => {
const moduleResolutions = {}
Object.entries(configModule.modules ?? {}).forEach(([moduleKey, module]) => {
moduleResolutions[moduleKey] = registerMedusaModule(moduleKey, module)[
moduleKey
]
})
for (const moduleResolution of Object.values(moduleResolutions)) {
if (
!moduleResolution.resolutionPath ||
moduleResolution.moduleDeclaration.scope !== "internal" ||
moduleResolution.moduleDeclaration.resources !== "isolated"
) {
continue
}
await MedusaModule.migrateUp({
moduleKey: moduleResolution.definition.key,
modulePath: moduleResolution.resolutionPath,
options: moduleResolution.options,
})
}
}
export const revertIsolatedModulesMigration = async (configModule) => {
const moduleResolutions = {}
Object.entries(configModule.modules ?? {}).forEach(([moduleKey, module]) => {
moduleResolutions[moduleKey] = registerMedusaModule(moduleKey, module)[
moduleKey
]
})
for (const moduleResolution of Object.values(moduleResolutions)) {
if (
!moduleResolution.resolutionPath ||
moduleResolution.moduleDeclaration.scope !== "internal" ||
moduleResolution.moduleDeclaration.resources !== "isolated"
) {
continue
}
await MedusaModule.migrateDown({
moduleKey: moduleResolution.definition.key,
modulePath: moduleResolution.resolutionPath,
options: moduleResolution.options,
})
}
}
-2
View File
@@ -1,5 +1,3 @@
import "reflect-metadata"
export interface FindConfig<Entity> { export interface FindConfig<Entity> {
select?: (keyof Entity)[] select?: (keyof Entity)[]
skip?: number skip?: number
+7 -6
View File
@@ -34,7 +34,6 @@
"orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear" "orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear"
}, },
"devDependencies": { "devDependencies": {
"@medusajs/modules-sdk": "^1.12.11",
"@medusajs/types": "^1.11.16", "@medusajs/types": "^1.11.16",
"@mikro-orm/cli": "5.9.7", "@mikro-orm/cli": "5.9.7",
"cross-env": "^5.2.1", "cross-env": "^5.2.1",
@@ -46,10 +45,12 @@
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },
"dependencies": { "dependencies": {
"@medusajs/utils": "^1.11.9", "@medusajs/utils": "^1.11.9"
"@mikro-orm/core": "5.9.7", },
"@mikro-orm/migrations": "5.9.7", "peerDependencies": {
"@mikro-orm/postgresql": "5.9.7", "@mikro-orm/core": "*",
"awilix": "^8.0.0" "@mikro-orm/migrations": "*",
"@mikro-orm/postgresql": "*",
"awilix": "*"
} }
} }
+7 -5
View File
@@ -45,13 +45,15 @@
}, },
"dependencies": { "dependencies": {
"@medusajs/modules-sdk": "^1.12.9", "@medusajs/modules-sdk": "^1.12.9",
"@medusajs/utils": "^1.11.7", "@medusajs/utils": "^1.11.9",
"@mikro-orm/core": "5.9.7",
"@mikro-orm/migrations": "5.9.7",
"@mikro-orm/postgresql": "5.9.7",
"awilix": "^8.0.0",
"jsonwebtoken": "^9.0.2", "jsonwebtoken": "^9.0.2",
"scrypt-kdf": "^2.0.1", "scrypt-kdf": "^2.0.1",
"simple-oauth2": "^5.0.0" "simple-oauth2": "^5.0.0"
},
"peerDependencies": {
"@mikro-orm/core": "*",
"@mikro-orm/migrations": "*",
"@mikro-orm/postgresql": "*",
"awilix": "*"
} }
} }
+1 -1
View File
@@ -20,7 +20,7 @@
"author": "Medusa", "author": "Medusa",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@medusajs/types": "^1.11.6", "@medusajs/types": "^1.11.9",
"cross-env": "^5.2.1", "cross-env": "^5.2.1",
"jest": "^29.7.0", "jest": "^29.7.0",
"rimraf": "^5.0.1", "rimraf": "^5.0.1",
+1 -1
View File
@@ -1,4 +1,4 @@
import { ModuleExports } from "@medusajs/modules-sdk" import { ModuleExports } from "@medusajs/types"
import InMemoryCacheService from "./services/inmemory-cache" import InMemoryCacheService from "./services/inmemory-cache"
const service = InMemoryCacheService const service = InMemoryCacheService
@@ -1,11 +1,11 @@
import { MedusaModule } from "@medusajs/modules-sdk"
import { import {
ExternalModuleDeclaration, ExternalModuleDeclaration,
ICacheService,
InternalModuleDeclaration, InternalModuleDeclaration,
MedusaModule, } from "@medusajs/types"
} from "@medusajs/modules-sdk"
import { ICacheService } from "@medusajs/types"
import { InMemoryCacheModuleOptions } from "../types"
import { Modules } from "@medusajs/utils" import { Modules } from "@medusajs/utils"
import { InMemoryCacheModuleOptions } from "../types"
export const initialize = async ( export const initialize = async (
options?: InMemoryCacheModuleOptions | ExternalModuleDeclaration options?: InMemoryCacheModuleOptions | ExternalModuleDeclaration
+3 -1
View File
@@ -35,7 +35,9 @@
"dependencies": { "dependencies": {
"@medusajs/modules-sdk": "^1.12.11", "@medusajs/modules-sdk": "^1.12.11",
"@medusajs/utils": "^1.11.9", "@medusajs/utils": "^1.11.9",
"awilix": "^8.0.0",
"ioredis": "^5.4.1" "ioredis": "^5.4.1"
},
"peerDependencies": {
"awilix": "*"
} }
} }
+1 -1
View File
@@ -1,4 +1,4 @@
import { ModuleExports } from "@medusajs/modules-sdk" import { ModuleExports } from "@medusajs/types"
import Loader from "./loaders" import Loader from "./loaders"
import { RedisCacheService } from "./services" import { RedisCacheService } from "./services"
@@ -1,11 +1,11 @@
import { MedusaModule } from "@medusajs/modules-sdk"
import { import {
ExternalModuleDeclaration, ExternalModuleDeclaration,
ICacheService,
InternalModuleDeclaration, InternalModuleDeclaration,
MedusaModule, } from "@medusajs/types"
} from "@medusajs/modules-sdk"
import { ICacheService } from "@medusajs/types"
import { RedisCacheModuleOptions } from "../types"
import { Modules } from "@medusajs/utils" import { Modules } from "@medusajs/utils"
import { RedisCacheModuleOptions } from "../types"
export const initialize = async ( export const initialize = async (
options?: RedisCacheModuleOptions | ExternalModuleDeclaration options?: RedisCacheModuleOptions | ExternalModuleDeclaration
@@ -1,4 +1,4 @@
import { LoaderOptions } from "@medusajs/modules-sdk" import { LoaderOptions } from "@medusajs/types"
import { asValue } from "awilix" import { asValue } from "awilix"
import Redis from "ioredis" import Redis from "ioredis"
import { RedisCacheModuleOptions } from "../types" import { RedisCacheModuleOptions } from "../types"
+8 -7
View File
@@ -34,8 +34,7 @@
"orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear" "orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear"
}, },
"devDependencies": { "devDependencies": {
"@medusajs/modules-sdk": "^1.12.11", "@medusajs/types": "^1.11.16",
"@medusajs/types": "workspace:^",
"@mikro-orm/cli": "5.9.7", "@mikro-orm/cli": "5.9.7",
"cross-env": "^5.2.1", "cross-env": "^5.2.1",
"jest": "^29.7.0", "jest": "^29.7.0",
@@ -46,10 +45,12 @@
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },
"dependencies": { "dependencies": {
"@medusajs/utils": "^1.11.9", "@medusajs/utils": "^1.11.9"
"@mikro-orm/core": "5.9.7", },
"@mikro-orm/migrations": "5.9.7", "peerDependencies": {
"@mikro-orm/postgresql": "5.9.7", "@mikro-orm/core": "*",
"awilix": "^8.0.0" "@mikro-orm/migrations": "*",
"@mikro-orm/postgresql": "*",
"awilix": "*"
} }
} }
+8 -7
View File
@@ -34,22 +34,23 @@
"orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear" "orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear"
}, },
"devDependencies": { "devDependencies": {
"@medusajs/modules-sdk": "^1.12.11",
"@medusajs/types": "^1.11.16", "@medusajs/types": "^1.11.16",
"@mikro-orm/cli": "5.9.7", "@mikro-orm/cli": "5.9.7",
"cross-env": "^5.2.1", "cross-env": "^5.2.1",
"jest": "^29.7.0", "jest": "^29.7.0",
"medusa-test-utils": "workspace:^", "medusa-test-utils": "^1.1.44",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"tsc-alias": "^1.8.6", "tsc-alias": "^1.8.6",
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },
"dependencies": { "dependencies": {
"@medusajs/utils": "^1.11.9", "@medusajs/utils": "^1.11.9"
"@mikro-orm/core": "5.9.7", },
"@mikro-orm/migrations": "5.9.7", "peerDependencies": {
"@mikro-orm/postgresql": "5.9.7", "@mikro-orm/core": "*",
"awilix": "^8.0.0" "@mikro-orm/migrations": "*",
"@mikro-orm/postgresql": "*",
"awilix": "*"
} }
} }
+8 -7
View File
@@ -34,7 +34,7 @@
"orm:cache:clear": "MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear" "orm:cache:clear": "MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear"
}, },
"devDependencies": { "devDependencies": {
"@medusajs/types": "workspace:^", "@medusajs/types": "^1.11.16",
"@mikro-orm/cli": "5.9.7", "@mikro-orm/cli": "5.9.7",
"cross-env": "^5.2.1", "cross-env": "^5.2.1",
"jest": "^29.7.0", "jest": "^29.7.0",
@@ -45,11 +45,12 @@
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },
"dependencies": { "dependencies": {
"@medusajs/modules-sdk": "^1.12.11", "@medusajs/utils": "^1.11.9"
"@medusajs/utils": "^1.11.9", },
"@mikro-orm/core": "5.9.7", "peerDependencies": {
"@mikro-orm/migrations": "5.9.7", "@mikro-orm/core": "*",
"@mikro-orm/postgresql": "5.9.7", "@mikro-orm/migrations": "*",
"awilix": "^8.0.0" "@mikro-orm/postgresql": "*",
"awilix": "*"
} }
} }
@@ -34,7 +34,7 @@
}, },
"dependencies": { "dependencies": {
"@medusajs/modules-sdk": "^1.12.8", "@medusajs/modules-sdk": "^1.12.8",
"@medusajs/utils": "^1.11.5", "@medusajs/utils": "^1.11.9",
"ulid": "^2.3.0" "ulid": "^2.3.0"
} }
} }
@@ -1,4 +1,4 @@
import { ModuleExports } from "@medusajs/modules-sdk" import { ModuleExports } from "@medusajs/types"
import Loader from "./loaders" import Loader from "./loaders"
import LocalEventBus from "./services/event-bus-local" import LocalEventBus from "./services/event-bus-local"
@@ -1,4 +1,4 @@
import { LoaderOptions } from "@medusajs/modules-sdk" import { LoaderOptions } from "@medusajs/types"
export default async ({ logger }: LoaderOptions): Promise<void> => { export default async ({ logger }: LoaderOptions): Promise<void> => {
logger?.warn( logger?.warn(
@@ -1,9 +1,9 @@
import { MedusaContainer } from "@medusajs/modules-sdk"
import { import {
Event,
EventBusTypes, EventBusTypes,
Logger, Logger,
MedusaContainer,
Message, Message,
Event,
Subscriber, Subscriber,
} from "@medusajs/types" } from "@medusajs/types"
import { AbstractEventBusModuleService } from "@medusajs/utils" import { AbstractEventBusModuleService } from "@medusajs/utils"
@@ -36,8 +36,10 @@
"dependencies": { "dependencies": {
"@medusajs/modules-sdk": "^1.12.11", "@medusajs/modules-sdk": "^1.12.11",
"@medusajs/utils": "^1.11.9", "@medusajs/utils": "^1.11.9",
"awilix": "^8.0.0",
"bullmq": "5.12.0", "bullmq": "5.12.0",
"ioredis": "^5.4.1" "ioredis": "^5.4.1"
},
"peerDependencies": {
"awilix": "*"
} }
} }
@@ -1,4 +1,4 @@
import { ModuleExports } from "@medusajs/modules-sdk" import { ModuleExports } from "@medusajs/types"
import Loader from "./loaders" import Loader from "./loaders"
import RedisEventBusService from "./services/event-bus-redis" import RedisEventBusService from "./services/event-bus-redis"
@@ -1,11 +1,11 @@
import { MedusaModule } from "@medusajs/modules-sdk"
import { import {
ExternalModuleDeclaration, ExternalModuleDeclaration,
IEventBusService,
InternalModuleDeclaration, InternalModuleDeclaration,
MedusaModule, } from "@medusajs/types"
} from "@medusajs/modules-sdk"
import { IEventBusService } from "@medusajs/types"
import { EventBusRedisModuleOptions } from "../types"
import { Modules } from "@medusajs/utils" import { Modules } from "@medusajs/utils"
import { EventBusRedisModuleOptions } from "../types"
export const initialize = async ( export const initialize = async (
options?: EventBusRedisModuleOptions | ExternalModuleDeclaration options?: EventBusRedisModuleOptions | ExternalModuleDeclaration
@@ -1,4 +1,4 @@
import { LoaderOptions } from "@medusajs/modules-sdk" import { LoaderOptions } from "@medusajs/types"
import { asValue } from "awilix" import { asValue } from "awilix"
import Redis from "ioredis" import Redis from "ioredis"
import { EOL } from "os" import { EOL } from "os"
@@ -1,5 +1,9 @@
import { InternalModuleDeclaration } from "@medusajs/modules-sdk" import {
import { Event, Logger, Message } from "@medusajs/types" Event,
InternalModuleDeclaration,
Logger,
Message,
} from "@medusajs/types"
import { import {
AbstractEventBusModuleService, AbstractEventBusModuleService,
isPresent, isPresent,
+7 -5
View File
@@ -48,10 +48,12 @@
}, },
"dependencies": { "dependencies": {
"@medusajs/modules-sdk": "^1.12.11", "@medusajs/modules-sdk": "^1.12.11",
"@medusajs/utils": "^1.11.8", "@medusajs/utils": "^1.11.9"
"@mikro-orm/core": "5.9.7", },
"@mikro-orm/migrations": "5.9.7", "peerDependencies": {
"@mikro-orm/postgresql": "5.9.7", "@mikro-orm/core": "*",
"awilix": "^8.0.0" "@mikro-orm/migrations": "*",
"@mikro-orm/postgresql": "*",
"awilix": "*"
} }
} }
+8 -6
View File
@@ -35,6 +35,7 @@
}, },
"devDependencies": { "devDependencies": {
"@medusajs/fulfillment-manual": "workspace:*", "@medusajs/fulfillment-manual": "workspace:*",
"@medusajs/types": "^1.11.16",
"@mikro-orm/cli": "5.9.7", "@mikro-orm/cli": "5.9.7",
"cross-env": "^5.2.1", "cross-env": "^5.2.1",
"jest": "^29.7.0", "jest": "^29.7.0",
@@ -46,11 +47,12 @@
}, },
"dependencies": { "dependencies": {
"@medusajs/modules-sdk": "^1.12.11", "@medusajs/modules-sdk": "^1.12.11",
"@medusajs/types": "^1.11.16", "@medusajs/utils": "^1.11.9"
"@medusajs/utils": "^1.11.9", },
"@mikro-orm/core": "5.9.7", "peerDependencies": {
"@mikro-orm/migrations": "5.9.7", "@mikro-orm/core": "*",
"@mikro-orm/postgresql": "5.9.7", "@mikro-orm/migrations": "*",
"awilix": "^8.0.0" "@mikro-orm/postgresql": "*",
"awilix": "*"
} }
} }
+7 -6
View File
@@ -31,12 +31,13 @@
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },
"dependencies": { "dependencies": {
"@medusajs/modules-sdk": "^1.12.10", "@medusajs/utils": "^1.11.9"
"@medusajs/utils": "^1.11.8", },
"@mikro-orm/core": "5.9.7", "peerDependencies": {
"@mikro-orm/migrations": "5.9.7", "@mikro-orm/core": "*",
"@mikro-orm/postgresql": "5.9.7", "@mikro-orm/migrations": "*",
"awilix": "^8.0.0" "@mikro-orm/postgresql": "*",
"awilix": "*"
}, },
"scripts": { "scripts": {
"watch": "tsc --build --watch", "watch": "tsc --build --watch",
@@ -1,8 +1,8 @@
import { InternalModuleDeclaration } from "@medusajs/modules-sdk"
import { import {
BigNumberInput, BigNumberInput,
Context, Context,
DAL, DAL,
InternalModuleDeclaration,
InventoryTypes, InventoryTypes,
ModuleJoinerConfig, ModuleJoinerConfig,
ModulesSdkTypes, ModulesSdkTypes,
@@ -1,5 +1,8 @@
import { MedusaModule } from "@medusajs/modules-sdk"
import { ILinkModule, ModuleJoinerConfig } from "@medusajs/types"
import { defineLink, isObject, Modules } from "@medusajs/utils"
import { moduleIntegrationTestRunner } from "medusa-test-utils"
import { MigrationsExecutionPlanner } from "../../src" import { MigrationsExecutionPlanner } from "../../src"
import { MedusaModule, ModuleJoinerConfig } from "@medusajs/modules-sdk"
import { import {
Car, Car,
carJoinerConfig, carJoinerConfig,
@@ -8,9 +11,6 @@ import {
userJoinerConfig, userJoinerConfig,
UserModule, UserModule,
} from "../__fixtures__/migrations" } from "../__fixtures__/migrations"
import { defineLink, isObject, Modules } from "@medusajs/utils"
import { moduleIntegrationTestRunner } from "medusa-test-utils"
import { ILinkModule } from "@medusajs/types"
jest.setTimeout(30000) jest.setTimeout(30000)
+7 -4
View File
@@ -41,9 +41,12 @@
}, },
"dependencies": { "dependencies": {
"@medusajs/modules-sdk": "^1.12.11", "@medusajs/modules-sdk": "^1.12.11",
"@medusajs/utils": "^1.11.9", "@medusajs/utils": "^1.11.9"
"@mikro-orm/core": "5.9.7", },
"@mikro-orm/postgresql": "5.9.7", "peerDependencies": {
"awilix": "^8.0.0" "@mikro-orm/core": "*",
"@mikro-orm/migrations": "*",
"@mikro-orm/postgresql": "*",
"awilix": "*"
} }
} }
@@ -1,5 +1,4 @@
import { import {
InternalModuleDeclaration,
MedusaModule, MedusaModule,
MODULE_RESOURCE_TYPE, MODULE_RESOURCE_TYPE,
MODULE_SCOPE, MODULE_SCOPE,
@@ -7,6 +6,7 @@ import {
import { import {
ExternalModuleDeclaration, ExternalModuleDeclaration,
ILinkModule, ILinkModule,
InternalModuleDeclaration,
LinkModuleDefinition, LinkModuleDefinition,
ModuleExports, ModuleExports,
ModuleJoinerConfig, ModuleJoinerConfig,
@@ -3,7 +3,7 @@ import {
LoaderOptions, LoaderOptions,
ModuleServiceInitializeCustomDataLayerOptions, ModuleServiceInitializeCustomDataLayerOptions,
ModuleServiceInitializeOptions, ModuleServiceInitializeOptions,
} from "@medusajs/modules-sdk" } from "@medusajs/types"
import { ModulesSdkUtils } from "@medusajs/utils" import { ModulesSdkUtils } from "@medusajs/utils"
import { EntitySchema } from "@mikro-orm/core" import { EntitySchema } from "@mikro-orm/core"
@@ -1,9 +1,9 @@
import { BaseRepository, getLinkRepository } from "@repositories" import { BaseRepository, getLinkRepository } from "@repositories"
import { LinkService, getModuleService } from "@services" import { LinkService, getModuleService } from "@services"
import { LoaderOptions } from "@medusajs/modules-sdk"
import { import {
InternalModuleDeclaration, InternalModuleDeclaration,
LoaderOptions,
ModuleJoinerConfig, ModuleJoinerConfig,
ModulesSdkTypes, ModulesSdkTypes,
} from "@medusajs/types" } from "@medusajs/types"
+7 -5
View File
@@ -46,10 +46,12 @@
}, },
"dependencies": { "dependencies": {
"@medusajs/modules-sdk": "^1.12.11", "@medusajs/modules-sdk": "^1.12.11",
"@medusajs/utils": "^1.11.9", "@medusajs/utils": "^1.11.9"
"@mikro-orm/core": "5.9.7", },
"@mikro-orm/migrations": "5.9.7", "peerDependencies": {
"@mikro-orm/postgresql": "5.9.7", "@mikro-orm/core": "*",
"awilix": "^8.0.0" "@mikro-orm/migrations": "*",
"@mikro-orm/postgresql": "*",
"awilix": "*"
} }
} }
+7 -6
View File
@@ -34,7 +34,6 @@
"orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear" "orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear"
}, },
"devDependencies": { "devDependencies": {
"@medusajs/modules-sdk": "^1.12.11",
"@medusajs/types": "^1.11.16", "@medusajs/types": "^1.11.16",
"@mikro-orm/cli": "5.9.7", "@mikro-orm/cli": "5.9.7",
"cross-env": "^5.2.1", "cross-env": "^5.2.1",
@@ -46,10 +45,12 @@
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },
"dependencies": { "dependencies": {
"@medusajs/utils": "^1.11.9", "@medusajs/utils": "^1.11.9"
"@mikro-orm/core": "5.9.7", },
"@mikro-orm/migrations": "5.9.7", "peerDependencies": {
"@mikro-orm/postgresql": "5.9.7", "@mikro-orm/core": "*",
"awilix": "^8.0.0" "@mikro-orm/migrations": "*",
"@mikro-orm/postgresql": "*",
"awilix": "*"
} }
} }
+8 -6
View File
@@ -47,11 +47,13 @@
}, },
"dependencies": { "dependencies": {
"@medusajs/modules-sdk": "^1.12.11", "@medusajs/modules-sdk": "^1.12.11",
"@medusajs/utils": "^1.11.9", "@medusajs/utils": "^1.11.9"
"@mikro-orm/core": "5.9.7", },
"@mikro-orm/migrations": "5.9.7", "peerDependencies": {
"@mikro-orm/postgresql": "5.9.7", "@mikro-orm/core": "*",
"awilix": "^8.0.0", "@mikro-orm/migrations": "*",
"bignumber.js": "^9.1.2" "@mikro-orm/postgresql": "*",
"awilix": "*",
"bignumber.js": "*"
} }
} }
+7 -6
View File
@@ -34,7 +34,6 @@
"orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear" "orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear"
}, },
"devDependencies": { "devDependencies": {
"@medusajs/modules-sdk": "^1.12.11",
"@medusajs/types": "^1.11.16", "@medusajs/types": "^1.11.16",
"@mikro-orm/cli": "5.9.7", "@mikro-orm/cli": "5.9.7",
"cross-env": "^5.2.1", "cross-env": "^5.2.1",
@@ -47,10 +46,12 @@
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },
"dependencies": { "dependencies": {
"@medusajs/utils": "^1.11.9", "@medusajs/utils": "^1.11.9"
"@mikro-orm/core": "5.9.7", },
"@mikro-orm/migrations": "5.9.7", "peerDependencies": {
"@mikro-orm/postgresql": "5.9.7", "@mikro-orm/core": "*",
"awilix": "^8.0.0" "@mikro-orm/migrations": "*",
"@mikro-orm/postgresql": "*",
"awilix": "*"
} }
} }
@@ -1,7 +1,6 @@
import * as entities from "./src/models"
import { defineMikroOrmCliConfig, Modules } from "@medusajs/utils" import { defineMikroOrmCliConfig, Modules } from "@medusajs/utils"
import * as entities from "./src/models"
export default defineMikroOrmCliConfig(Modules.PRODUCT, { export default defineMikroOrmCliConfig(Modules.PRODUCT, {
entities: Object.values(entities), entities: Object.values(entities),
databaseName: "medusa-products",
}) })
+7 -6
View File
@@ -34,7 +34,6 @@
"orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear" "orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear"
}, },
"devDependencies": { "devDependencies": {
"@medusajs/modules-sdk": "^1.12.11",
"@medusajs/types": "^1.11.16", "@medusajs/types": "^1.11.16",
"@mikro-orm/cli": "5.9.7", "@mikro-orm/cli": "5.9.7",
"cross-env": "^5.2.1", "cross-env": "^5.2.1",
@@ -48,10 +47,12 @@
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },
"dependencies": { "dependencies": {
"@medusajs/utils": "^1.11.9", "@medusajs/utils": "^1.11.9"
"@mikro-orm/core": "5.9.7", },
"@mikro-orm/migrations": "5.9.7", "peerDependencies": {
"@mikro-orm/postgresql": "5.9.7", "@mikro-orm/core": "*",
"awilix": "^8.0.0" "@mikro-orm/migrations": "*",
"@mikro-orm/postgresql": "*",
"awilix": "*"
} }
} }
+7 -6
View File
@@ -34,7 +34,6 @@
"orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear" "orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear"
}, },
"devDependencies": { "devDependencies": {
"@medusajs/modules-sdk": "^1.12.11",
"@medusajs/types": "^1.11.16", "@medusajs/types": "^1.11.16",
"@mikro-orm/cli": "5.9.7", "@mikro-orm/cli": "5.9.7",
"cross-env": "^5.2.1", "cross-env": "^5.2.1",
@@ -47,10 +46,12 @@
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },
"dependencies": { "dependencies": {
"@medusajs/utils": "1.11.9", "@medusajs/utils": "1.11.9"
"@mikro-orm/core": "5.9.7", },
"@mikro-orm/migrations": "5.9.7", "peerDependencies": {
"@mikro-orm/postgresql": "5.9.7", "@mikro-orm/core": "*",
"awilix": "^8.0.0" "@mikro-orm/migrations": "*",
"@mikro-orm/postgresql": "*",
"awilix": "*"
} }
} }
@@ -30,7 +30,7 @@
"typescript": "^5.3.3" "typescript": "^5.3.3"
}, },
"dependencies": { "dependencies": {
"@medusajs/utils": "^1.11.7", "@medusajs/utils": "^1.11.9",
"scrypt-kdf": "^2.0.1" "scrypt-kdf": "^2.0.1"
}, },
"keywords": [ "keywords": [

Some files were not shown because too many files have changed in this diff Show More