chore: Update modules deps (#9286)
This commit is contained in:
+1
-1
@@ -134,7 +134,7 @@ module.exports = {
|
|||||||
"./packages/modules/providers/fulfillment-manual/tsconfig.spec.json",
|
"./packages/modules/providers/fulfillment-manual/tsconfig.spec.json",
|
||||||
"./packages/modules/providers/payment-stripe/tsconfig.spec.json",
|
"./packages/modules/providers/payment-stripe/tsconfig.spec.json",
|
||||||
|
|
||||||
"./packages/framework/framework/tsconfig.json",
|
"./packages/framework/tsconfig.json",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
|
|||||||
@@ -23,7 +23,8 @@
|
|||||||
"./types": "./dist/types/index.js",
|
"./types": "./dist/types/index.js",
|
||||||
"./orchestration": "./dist/orchestration/index.js",
|
"./orchestration": "./dist/orchestration/index.js",
|
||||||
"./workflows-sdk": "./dist/workflows-sdk/index.js",
|
"./workflows-sdk": "./dist/workflows-sdk/index.js",
|
||||||
"./workflows-sdk/composer": "./dist/workflows-sdk/composer.js"
|
"./workflows-sdk/composer": "./dist/workflows-sdk/composer.js",
|
||||||
|
"./modules-sdk": "./dist/modules-sdk/index.js"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=20"
|
"node": ">=20"
|
||||||
@@ -31,7 +32,7 @@
|
|||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/medusajs/medusa",
|
"url": "https://github.com/medusajs/medusa",
|
||||||
"directory": "packages/framework/framework"
|
"directory": "packages/framework"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public"
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
export * from "@medusajs/modules-sdk"
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"nodemon": "^2.0.20",
|
"nodemon": "^2.0.20",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"typescript": "^4.1.3"
|
"typescript": "^5.6.2"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "nodemon --watch plugins/ --watch src/ --exec node src/index.js",
|
"start": "nodemon --watch plugins/ --watch src/ --exec node src/index.js",
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"declarationMap": true,
|
"declarationMap": true,
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"module": "commonjs",
|
"module": "Node16",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "Node16",
|
||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"sourceMap": false,
|
"sourceMap": false,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { CreateApiKeyDTO } from "@types"
|
import { CreateApiKeyDTO } from "@types"
|
||||||
import { ApiKeyType } from "@medusajs/utils"
|
import { ApiKeyType } from "@medusajs/framework/utils"
|
||||||
|
|
||||||
export const createSecretKeyFixture: CreateApiKeyDTO = {
|
export const createSecretKeyFixture: CreateApiKeyDTO = {
|
||||||
title: "Secret key",
|
title: "Secret key",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { IApiKeyModuleService } from "@medusajs/types"
|
import { IApiKeyModuleService } from "@medusajs/framework/types"
|
||||||
import { ApiKeyType, Module, Modules } from "@medusajs/utils"
|
import { ApiKeyType, Module, Modules } from "@medusajs/framework/utils"
|
||||||
import { ApiKeyModuleService } from "@services"
|
import { ApiKeyModuleService } from "@services"
|
||||||
import crypto from "crypto"
|
import crypto from "crypto"
|
||||||
import { moduleIntegrationTestRunner } from "medusa-test-utils"
|
import { moduleIntegrationTestRunner } from "medusa-test-utils"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as entities from "./src/models"
|
import * as entities from "./src/models"
|
||||||
import { defineMikroOrmCliConfig, Modules } from "@medusajs/utils"
|
import { defineMikroOrmCliConfig, Modules } from "@medusajs/framework/utils"
|
||||||
|
|
||||||
export default defineMikroOrmCliConfig(Modules.API_KEY, {
|
export default defineMikroOrmCliConfig(Modules.API_KEY, {
|
||||||
entities: Object.values(entities),
|
entities: Object.values(entities),
|
||||||
|
|||||||
@@ -37,7 +37,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": "^1.11.16",
|
"@medusajs/framework": "^0.0.1",
|
||||||
"cross-env": "^5.2.1",
|
"cross-env": "^5.2.1",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"medusa-test-utils": "^1.1.44",
|
"medusa-test-utils": "^1.1.44",
|
||||||
@@ -46,10 +46,8 @@
|
|||||||
"tsc-alias": "^1.8.6",
|
"tsc-alias": "^1.8.6",
|
||||||
"typescript": "^5.6.2"
|
"typescript": "^5.6.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
|
||||||
"@medusajs/utils": "^1.11.9"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
|
"@medusajs/framework": "^0.0.1",
|
||||||
"@mikro-orm/core": "5.9.7",
|
"@mikro-orm/core": "5.9.7",
|
||||||
"@mikro-orm/migrations": "5.9.7",
|
"@mikro-orm/migrations": "5.9.7",
|
||||||
"@mikro-orm/postgresql": "5.9.7",
|
"@mikro-orm/postgresql": "5.9.7",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Module, Modules } from "@medusajs/utils"
|
import { Module, Modules } from "@medusajs/framework/utils"
|
||||||
import { ApiKeyModuleService } from "@services"
|
import { ApiKeyModuleService } from "@services"
|
||||||
|
|
||||||
export default Module(Modules.API_KEY, {
|
export default Module(Modules.API_KEY, {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { defineJoinerConfig, Modules } from "@medusajs/utils"
|
import { defineJoinerConfig, Modules } from "@medusajs/framework/utils"
|
||||||
|
|
||||||
export const joinerConfig = defineJoinerConfig(Modules.API_KEY, {
|
export const joinerConfig = defineJoinerConfig(Modules.API_KEY, {
|
||||||
linkableKeys: {
|
linkableKeys: {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import {
|
|||||||
Searchable,
|
Searchable,
|
||||||
createPsqlIndexStatementHelper,
|
createPsqlIndexStatementHelper,
|
||||||
generateEntityId,
|
generateEntityId,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
BeforeCreate,
|
BeforeCreate,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
InternalModuleDeclaration,
|
InternalModuleDeclaration,
|
||||||
ModuleJoinerConfig,
|
ModuleJoinerConfig,
|
||||||
ModulesSdkTypes,
|
ModulesSdkTypes,
|
||||||
} from "@medusajs/types"
|
} from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
ApiKeyType,
|
ApiKeyType,
|
||||||
InjectManager,
|
InjectManager,
|
||||||
@@ -20,7 +20,7 @@ import {
|
|||||||
MedusaError,
|
MedusaError,
|
||||||
MedusaService,
|
MedusaService,
|
||||||
promiseAll,
|
promiseAll,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import { ApiKey } from "@models"
|
import { ApiKey } from "@models"
|
||||||
import {
|
import {
|
||||||
CreateApiKeyDTO,
|
CreateApiKeyDTO,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
Logger,
|
Logger,
|
||||||
RevokeApiKeyDTO,
|
RevokeApiKeyDTO,
|
||||||
UpdateApiKeyDTO,
|
UpdateApiKeyDTO,
|
||||||
} from "@medusajs/types"
|
} from "@medusajs/framework/types"
|
||||||
|
|
||||||
export type InitializeModuleInjectableDependencies = {
|
export type InitializeModuleInjectableDependencies = {
|
||||||
logger?: Logger
|
logger?: Logger
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { IAuthModuleService } from "@medusajs/types"
|
import { IAuthModuleService } from "@medusajs/framework/types"
|
||||||
import { AuthIdentity } from "@models"
|
import { AuthIdentity } from "@models"
|
||||||
|
|
||||||
export async function createAuthIdentities(
|
export async function createAuthIdentities(
|
||||||
|
|||||||
@@ -3,8 +3,11 @@ import {
|
|||||||
AuthIdentityProviderService,
|
AuthIdentityProviderService,
|
||||||
AuthenticationInput,
|
AuthenticationInput,
|
||||||
AuthenticationResponse,
|
AuthenticationResponse,
|
||||||
} from "@medusajs/types"
|
} from "@medusajs/framework/types"
|
||||||
import { AbstractAuthModuleProvider, MedusaError } from "@medusajs/utils"
|
import {
|
||||||
|
AbstractAuthModuleProvider,
|
||||||
|
MedusaError,
|
||||||
|
} from "@medusajs/framework/utils"
|
||||||
|
|
||||||
export class AuthServiceFixtures extends AbstractAuthModuleProvider {
|
export class AuthServiceFixtures extends AbstractAuthModuleProvider {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
import { IAuthModuleService } from "@medusajs/types"
|
import { IAuthModuleService } from "@medusajs/framework/types"
|
||||||
import { Modules } from "@medusajs/utils"
|
import { Modules } from "@medusajs/framework/utils"
|
||||||
import { moduleIntegrationTestRunner } from "medusa-test-utils"
|
import { moduleIntegrationTestRunner } from "medusa-test-utils"
|
||||||
import { createAuthIdentities } from "../../__fixtures__/auth-identity"
|
import { createAuthIdentities } from "../../__fixtures__/auth-identity"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { IAuthModuleService } from "@medusajs/types"
|
import { IAuthModuleService } from "@medusajs/framework/types"
|
||||||
import { Module, Modules } from "@medusajs/utils"
|
import { Module, Modules } from "@medusajs/framework/utils"
|
||||||
import { AuthModuleService } from "@services"
|
import { AuthModuleService } from "@services"
|
||||||
import { SuiteOptions, moduleIntegrationTestRunner } from "medusa-test-utils"
|
import { SuiteOptions, moduleIntegrationTestRunner } from "medusa-test-utils"
|
||||||
import { resolve } from "path"
|
import { resolve } from "path"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as entities from "./src/models"
|
import * as entities from "./src/models"
|
||||||
import { defineMikroOrmCliConfig, Modules } from "@medusajs/utils"
|
import { defineMikroOrmCliConfig, Modules } from "@medusajs/framework/utils"
|
||||||
|
|
||||||
export default defineMikroOrmCliConfig(Modules.AUTH, {
|
export default defineMikroOrmCliConfig(Modules.AUTH, {
|
||||||
entities: Object.values(entities),
|
entities: Object.values(entities),
|
||||||
|
|||||||
@@ -37,7 +37,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": "^1.11.14",
|
"@medusajs/framework": "^0.0.1",
|
||||||
"@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",
|
||||||
@@ -47,13 +47,12 @@
|
|||||||
"typescript": "^5.6.2"
|
"typescript": "^5.6.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@medusajs/modules-sdk": "^1.12.11",
|
|
||||||
"@medusajs/utils": "^1.11.9",
|
|
||||||
"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": {
|
"peerDependencies": {
|
||||||
|
"@medusajs/framework": "^0.0.1",
|
||||||
"@mikro-orm/core": "5.9.7",
|
"@mikro-orm/core": "5.9.7",
|
||||||
"@mikro-orm/migrations": "5.9.7",
|
"@mikro-orm/migrations": "5.9.7",
|
||||||
"@mikro-orm/postgresql": "5.9.7",
|
"@mikro-orm/postgresql": "5.9.7",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { AuthModuleService } from "@services"
|
import { AuthModuleService } from "@services"
|
||||||
import loadProviders from "./loaders/providers"
|
import loadProviders from "./loaders/providers"
|
||||||
import { Module, Modules } from "@medusajs/utils"
|
import { Module, Modules } from "@medusajs/framework/utils"
|
||||||
|
|
||||||
export default Module(Modules.AUTH, {
|
export default Module(Modules.AUTH, {
|
||||||
service: AuthModuleService,
|
service: AuthModuleService,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { defineJoinerConfig, Modules } from "@medusajs/utils"
|
import { defineJoinerConfig, Modules } from "@medusajs/framework/utils"
|
||||||
import { AuthIdentity, ProviderIdentity } from "@models"
|
import { AuthIdentity, ProviderIdentity } from "@models"
|
||||||
|
|
||||||
export const joinerConfig = defineJoinerConfig(Modules.AUTH, {
|
export const joinerConfig = defineJoinerConfig(Modules.AUTH, {
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
import { LoaderOptions, ModulesSdkTypes, ModuleProvider } from "@medusajs/types"
|
import {
|
||||||
|
LoaderOptions,
|
||||||
|
ModulesSdkTypes,
|
||||||
|
ModuleProvider,
|
||||||
|
} from "@medusajs/framework/types"
|
||||||
import { Lifetime, asFunction, asValue } from "awilix"
|
import { Lifetime, asFunction, asValue } from "awilix"
|
||||||
import { moduleProviderLoader } from "@medusajs/modules-sdk"
|
import { moduleProviderLoader } from "@medusajs/framework/modules-sdk"
|
||||||
import {
|
import {
|
||||||
AuthIdentifiersRegistrationName,
|
AuthIdentifiersRegistrationName,
|
||||||
AuthProviderRegistrationPrefix,
|
AuthProviderRegistrationPrefix,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
Property,
|
Property,
|
||||||
} from "@mikro-orm/core"
|
} from "@mikro-orm/core"
|
||||||
|
|
||||||
import { generateEntityId } from "@medusajs/utils"
|
import { generateEntityId } from "@medusajs/framework/utils"
|
||||||
import ProviderIdentity from "./provider-identity"
|
import ProviderIdentity from "./provider-identity"
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
import {
|
import {
|
||||||
createPsqlIndexStatementHelper,
|
createPsqlIndexStatementHelper,
|
||||||
generateEntityId,
|
generateEntityId,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import AuthIdentity from "./auth-identity"
|
import AuthIdentity from "./auth-identity"
|
||||||
|
|
||||||
const providerEntityIdIndexName = "IDX_provider_identity_provider_entity_id"
|
const providerEntityIdIndexName = "IDX_provider_identity_provider_entity_id"
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ import {
|
|||||||
InternalModuleDeclaration,
|
InternalModuleDeclaration,
|
||||||
ModuleJoinerConfig,
|
ModuleJoinerConfig,
|
||||||
ModulesSdkTypes,
|
ModulesSdkTypes,
|
||||||
} from "@medusajs/types"
|
} from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
InjectManager,
|
InjectManager,
|
||||||
MedusaContext,
|
MedusaContext,
|
||||||
MedusaError,
|
MedusaError,
|
||||||
MedusaService,
|
MedusaService,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import { AuthIdentity, ProviderIdentity } from "@models"
|
import { AuthIdentity, ProviderIdentity } from "@models"
|
||||||
import { joinerConfig } from "../joiner-config"
|
import { joinerConfig } from "../joiner-config"
|
||||||
import AuthProviderService from "./auth-provider"
|
import AuthProviderService from "./auth-provider"
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ import {
|
|||||||
AuthIdentityProviderService,
|
AuthIdentityProviderService,
|
||||||
AuthTypes,
|
AuthTypes,
|
||||||
AuthenticationInput,
|
AuthenticationInput,
|
||||||
AuthenticationResponse
|
AuthenticationResponse,
|
||||||
} from "@medusajs/types"
|
} from "@medusajs/framework/types"
|
||||||
import { MedusaError } from "@medusajs/utils"
|
import { MedusaError } from "@medusajs/framework/utils"
|
||||||
import { AuthProviderRegistrationPrefix } from "@types"
|
import { AuthProviderRegistrationPrefix } from "@types"
|
||||||
|
|
||||||
type InjectedDependencies = {
|
type InjectedDependencies = {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { ModuleProviderExports } from "@medusajs/types"
|
import { ModuleProviderExports } from "@medusajs/framework/types"
|
||||||
import { ModuleServiceInitializeOptions } from "@medusajs/types"
|
import { ModuleServiceInitializeOptions } from "@medusajs/framework/types"
|
||||||
import { Logger } from "@medusajs/types"
|
import { Logger } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export type InitializeModuleInjectableDependencies = {
|
export type InitializeModuleInjectableDependencies = {
|
||||||
logger?: Logger
|
logger?: Logger
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
"author": "Medusa",
|
"author": "Medusa",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@medusajs/types": "^1.11.9",
|
"@medusajs/framework": "^0.0.1",
|
||||||
"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",
|
||||||
@@ -34,8 +34,7 @@
|
|||||||
"build": "rimraf dist && tsc --build",
|
"build": "rimraf dist && tsc --build",
|
||||||
"test": "jest --passWithNoTests"
|
"test": "jest --passWithNoTests"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"peerDependencies": {
|
||||||
"@medusajs/modules-sdk": "^1.12.11",
|
"@medusajs/framework": "^0.0.1"
|
||||||
"@medusajs/utils": "^1.11.9"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { ModuleExports } from "@medusajs/types"
|
import { ModuleExports } from "@medusajs/framework/types"
|
||||||
import InMemoryCacheService from "./services/inmemory-cache"
|
import InMemoryCacheService from "./services/inmemory-cache"
|
||||||
|
|
||||||
const service = InMemoryCacheService
|
const service = InMemoryCacheService
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { MedusaModule } from "@medusajs/modules-sdk"
|
import { MedusaModule } from "@medusajs/framework/modules-sdk"
|
||||||
import {
|
import {
|
||||||
ExternalModuleDeclaration,
|
ExternalModuleDeclaration,
|
||||||
ICacheService,
|
ICacheService,
|
||||||
InternalModuleDeclaration,
|
InternalModuleDeclaration,
|
||||||
} from "@medusajs/types"
|
} from "@medusajs/framework/types"
|
||||||
import { Modules } from "@medusajs/utils"
|
import { Modules } from "@medusajs/framework/utils"
|
||||||
import { InMemoryCacheModuleOptions } from "../types"
|
import { InMemoryCacheModuleOptions } from "../types"
|
||||||
|
|
||||||
export const initialize = async (
|
export const initialize = async (
|
||||||
@@ -13,7 +13,7 @@ export const initialize = async (
|
|||||||
const serviceKey = Modules.CACHE
|
const serviceKey = Modules.CACHE
|
||||||
const loaded = await MedusaModule.bootstrap<ICacheService>({
|
const loaded = await MedusaModule.bootstrap<ICacheService>({
|
||||||
moduleKey: serviceKey,
|
moduleKey: serviceKey,
|
||||||
defaultPath: "@medusajs/cache-inmemory",
|
defaultPath: "@medusajs//cache-inmemory",
|
||||||
declaration: options as
|
declaration: options as
|
||||||
| InternalModuleDeclaration
|
| InternalModuleDeclaration
|
||||||
| ExternalModuleDeclaration,
|
| ExternalModuleDeclaration,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { ICacheService } from "@medusajs/types"
|
import { ICacheService } from "@medusajs/framework/types"
|
||||||
import { CacheRecord, InMemoryCacheModuleOptions } from "../types"
|
import { CacheRecord, InMemoryCacheModuleOptions } from "../types"
|
||||||
|
|
||||||
const DEFAULT_TTL = 30 // seconds
|
const DEFAULT_TTL = 30 // seconds
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
"author": "Medusa",
|
"author": "Medusa",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@medusajs/types": "^1.11.16",
|
"@medusajs/framework": "^0.0.1",
|
||||||
"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",
|
||||||
@@ -35,11 +35,10 @@
|
|||||||
"test": "jest --passWithNoTests"
|
"test": "jest --passWithNoTests"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@medusajs/modules-sdk": "^1.12.11",
|
|
||||||
"@medusajs/utils": "^1.11.9",
|
|
||||||
"ioredis": "^5.4.1"
|
"ioredis": "^5.4.1"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
|
"@medusajs/framework": "^0.0.1",
|
||||||
"awilix": "^8.0.1"
|
"awilix": "^8.0.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { ModuleExports } from "@medusajs/types"
|
import { ModuleExports } from "@medusajs/framework/types"
|
||||||
import Loader from "./loaders"
|
import Loader from "./loaders"
|
||||||
import { RedisCacheService } from "./services"
|
import { RedisCacheService } from "./services"
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { MedusaModule } from "@medusajs/modules-sdk"
|
import { MedusaModule } from "@medusajs/framework/modules-sdk"
|
||||||
import {
|
import {
|
||||||
ExternalModuleDeclaration,
|
ExternalModuleDeclaration,
|
||||||
ICacheService,
|
ICacheService,
|
||||||
InternalModuleDeclaration,
|
InternalModuleDeclaration,
|
||||||
} from "@medusajs/types"
|
} from "@medusajs/framework/types"
|
||||||
import { Modules } from "@medusajs/utils"
|
import { Modules } from "@medusajs/framework/utils"
|
||||||
import { RedisCacheModuleOptions } from "../types"
|
import { RedisCacheModuleOptions } from "../types"
|
||||||
|
|
||||||
export const initialize = async (
|
export const initialize = async (
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { LoaderOptions } from "@medusajs/types"
|
import { LoaderOptions } from "@medusajs/framework/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"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { ICacheService } from "@medusajs/types"
|
import { ICacheService } from "@medusajs/framework/types"
|
||||||
import { Redis } from "ioredis"
|
import { Redis } from "ioredis"
|
||||||
import { RedisCacheModuleOptions } from "../types"
|
import { RedisCacheModuleOptions } from "../types"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { CreateCartDTO } from "@medusajs/types"
|
import { CreateCartDTO } from "@medusajs/framework/types"
|
||||||
import { SqlEntityManager } from "@mikro-orm/postgresql"
|
import { SqlEntityManager } from "@mikro-orm/postgresql"
|
||||||
import { Cart } from "../../../src/models"
|
import { Cart } from "../../../src/models"
|
||||||
import { defaultCartsData } from "./data"
|
import { defaultCartsData } from "./data"
|
||||||
|
|||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
import { ICartModuleService } from "@medusajs/types"
|
import { ICartModuleService } from "@medusajs/framework/types"
|
||||||
import { BigNumber, Module, Modules } from "@medusajs/utils"
|
import { BigNumber, Module, Modules } from "@medusajs/framework/utils"
|
||||||
import { CheckConstraintViolationException } from "@mikro-orm/core"
|
import { CheckConstraintViolationException } from "@mikro-orm/core"
|
||||||
import { CartModuleService } from "@services"
|
import { CartModuleService } from "@services"
|
||||||
import { moduleIntegrationTestRunner } from "medusa-test-utils"
|
import { moduleIntegrationTestRunner } from "medusa-test-utils"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as entities from "./src/models"
|
import * as entities from "./src/models"
|
||||||
import { defineMikroOrmCliConfig, Modules } from "@medusajs/utils"
|
import { defineMikroOrmCliConfig, Modules } from "@medusajs/framework/utils"
|
||||||
|
|
||||||
export default defineMikroOrmCliConfig(Modules.CART, {
|
export default defineMikroOrmCliConfig(Modules.CART, {
|
||||||
entities: Object.values(entities),
|
entities: Object.values(entities),
|
||||||
|
|||||||
@@ -37,7 +37,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/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",
|
||||||
@@ -47,10 +46,8 @@
|
|||||||
"tsc-alias": "^1.8.6",
|
"tsc-alias": "^1.8.6",
|
||||||
"typescript": "^5.6.2"
|
"typescript": "^5.6.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
|
||||||
"@medusajs/utils": "^1.11.9"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
|
"@medusajs/framework": "^0.0.1",
|
||||||
"@mikro-orm/core": "5.9.7",
|
"@mikro-orm/core": "5.9.7",
|
||||||
"@mikro-orm/migrations": "5.9.7",
|
"@mikro-orm/migrations": "5.9.7",
|
||||||
"@mikro-orm/postgresql": "5.9.7",
|
"@mikro-orm/postgresql": "5.9.7",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { CartModuleService } from "./services"
|
import { CartModuleService } from "./services"
|
||||||
import { Module, Modules } from "@medusajs/utils"
|
import { Module, Modules } from "@medusajs/framework/utils"
|
||||||
|
|
||||||
export default Module(Modules.CART, {
|
export default Module(Modules.CART, {
|
||||||
service: CartModuleService,
|
service: CartModuleService,
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { DAL } from "@medusajs/types"
|
import { DAL } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
DALUtils,
|
DALUtils,
|
||||||
createPsqlIndexStatementHelper,
|
createPsqlIndexStatementHelper,
|
||||||
generateEntityId,
|
generateEntityId,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
BeforeCreate,
|
BeforeCreate,
|
||||||
Entity,
|
Entity,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { DAL } from "@medusajs/types"
|
import { DAL } from "@medusajs/framework/types"
|
||||||
import { BigNumber, MikroOrmBigNumberProperty } from "@medusajs/utils"
|
import { BigNumber, MikroOrmBigNumberProperty } from "@medusajs/framework/utils"
|
||||||
import { OptionalProps, PrimaryKey, Property } from "@mikro-orm/core"
|
import { OptionalProps, PrimaryKey, Property } from "@mikro-orm/core"
|
||||||
|
|
||||||
type OptionalAdjustmentLineProps = DAL.SoftDeletableModelDateColumns
|
type OptionalAdjustmentLineProps = DAL.SoftDeletableModelDateColumns
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { DAL } from "@medusajs/types"
|
import { DAL } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
DALUtils,
|
DALUtils,
|
||||||
createPsqlIndexStatementHelper,
|
createPsqlIndexStatementHelper,
|
||||||
generateEntityId,
|
generateEntityId,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
BeforeCreate,
|
BeforeCreate,
|
||||||
Cascade,
|
Cascade,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import {
|
|||||||
DALUtils,
|
DALUtils,
|
||||||
createPsqlIndexStatementHelper,
|
createPsqlIndexStatementHelper,
|
||||||
generateEntityId,
|
generateEntityId,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
BeforeCreate,
|
BeforeCreate,
|
||||||
Check,
|
Check,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import {
|
|||||||
DALUtils,
|
DALUtils,
|
||||||
createPsqlIndexStatementHelper,
|
createPsqlIndexStatementHelper,
|
||||||
generateEntityId,
|
generateEntityId,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
BeforeCreate,
|
BeforeCreate,
|
||||||
Entity,
|
Entity,
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { BigNumberRawValue, DAL } from "@medusajs/types"
|
import { BigNumberRawValue, DAL } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
BigNumber,
|
BigNumber,
|
||||||
DALUtils,
|
DALUtils,
|
||||||
MikroOrmBigNumberProperty,
|
MikroOrmBigNumberProperty,
|
||||||
createPsqlIndexStatementHelper,
|
createPsqlIndexStatementHelper,
|
||||||
generateEntityId,
|
generateEntityId,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
BeforeCreate,
|
BeforeCreate,
|
||||||
Cascade,
|
Cascade,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import {
|
|||||||
DALUtils,
|
DALUtils,
|
||||||
createPsqlIndexStatementHelper,
|
createPsqlIndexStatementHelper,
|
||||||
generateEntityId,
|
generateEntityId,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
BeforeCreate,
|
BeforeCreate,
|
||||||
Entity,
|
Entity,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import {
|
|||||||
DALUtils,
|
DALUtils,
|
||||||
createPsqlIndexStatementHelper,
|
createPsqlIndexStatementHelper,
|
||||||
generateEntityId,
|
generateEntityId,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
BeforeCreate,
|
BeforeCreate,
|
||||||
Entity,
|
Entity,
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { BigNumberRawValue, DAL } from "@medusajs/types"
|
import { BigNumberRawValue, DAL } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
BigNumber,
|
BigNumber,
|
||||||
DALUtils,
|
DALUtils,
|
||||||
MikroOrmBigNumberProperty,
|
MikroOrmBigNumberProperty,
|
||||||
createPsqlIndexStatementHelper,
|
createPsqlIndexStatementHelper,
|
||||||
generateEntityId,
|
generateEntityId,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
BeforeCreate,
|
BeforeCreate,
|
||||||
Cascade,
|
Cascade,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { DAL } from "@medusajs/types"
|
import { DAL } from "@medusajs/framework/types"
|
||||||
import { OptionalProps, PrimaryKey, Property } from "@mikro-orm/core"
|
import { OptionalProps, PrimaryKey, Property } from "@mikro-orm/core"
|
||||||
|
|
||||||
type OptionalTaxLineProps = DAL.SoftDeletableModelDateColumns
|
type OptionalTaxLineProps = DAL.SoftDeletableModelDateColumns
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
ICartModuleService,
|
ICartModuleService,
|
||||||
InternalModuleDeclaration,
|
InternalModuleDeclaration,
|
||||||
ModulesSdkTypes,
|
ModulesSdkTypes,
|
||||||
} from "@medusajs/types"
|
} from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
createRawPropertiesFromBigNumber,
|
createRawPropertiesFromBigNumber,
|
||||||
decorateCartTotals,
|
decorateCartTotals,
|
||||||
@@ -19,7 +19,7 @@ import {
|
|||||||
MedusaContext,
|
MedusaContext,
|
||||||
MedusaError,
|
MedusaError,
|
||||||
ModulesSdkUtils,
|
ModulesSdkUtils,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
Address,
|
Address,
|
||||||
Cart,
|
Cart,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Logger } from "@medusajs/types"
|
import { Logger } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export * from "./address"
|
export * from "./address"
|
||||||
export * from "./cart"
|
export * from "./cart"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { BigNumberInput } from "@medusajs/types"
|
import { BigNumberInput } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export interface CreateLineItemAdjustmentDTO {
|
export interface CreateLineItemAdjustmentDTO {
|
||||||
item_id: string
|
item_id: string
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { BigNumberInput } from "@medusajs/types"
|
import { BigNumberInput } from "@medusajs/framework/types"
|
||||||
|
|
||||||
interface PartialUpsertLineItemDTO {
|
interface PartialUpsertLineItemDTO {
|
||||||
subtitle?: string
|
subtitle?: string
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { BigNumberInput } from "@medusajs/types"
|
import { BigNumberInput } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export interface CreateShippingMethodAdjustmentDTO {
|
export interface CreateShippingMethodAdjustmentDTO {
|
||||||
shipping_method_id: string
|
shipping_method_id: string
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { BigNumberInput } from "@medusajs/types"
|
import { BigNumberInput } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export interface CreateShippingMethodDTO {
|
export interface CreateShippingMethodDTO {
|
||||||
name: string
|
name: string
|
||||||
|
|||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
import { ICurrencyModuleService } from "@medusajs/types"
|
import { ICurrencyModuleService } from "@medusajs/framework/types"
|
||||||
import { Module, Modules } from "@medusajs/utils"
|
import { Module, Modules } from "@medusajs/framework/utils"
|
||||||
import { CurrencyModuleService } from "@services"
|
import { CurrencyModuleService } from "@services"
|
||||||
import { moduleIntegrationTestRunner } from "medusa-test-utils"
|
import { moduleIntegrationTestRunner } from "medusa-test-utils"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { defineMikroOrmCliConfig, Modules } from "@medusajs/utils"
|
import { defineMikroOrmCliConfig, Modules } from "@medusajs/framework/utils"
|
||||||
import * as entities from "./src/models"
|
import * as entities from "./src/models"
|
||||||
|
|
||||||
export default defineMikroOrmCliConfig(Modules.CURRENCY, {
|
export default defineMikroOrmCliConfig(Modules.CURRENCY, {
|
||||||
|
|||||||
@@ -37,7 +37,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": "^1.11.16",
|
"@medusajs/framework": "^0.0.1",
|
||||||
"@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",
|
||||||
@@ -47,10 +47,8 @@
|
|||||||
"tsc-alias": "^1.8.6",
|
"tsc-alias": "^1.8.6",
|
||||||
"typescript": "^5.6.2"
|
"typescript": "^5.6.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
|
||||||
"@medusajs/utils": "^1.11.9"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
|
"@medusajs/framework": "^0.0.1",
|
||||||
"@mikro-orm/core": "5.9.7",
|
"@mikro-orm/core": "5.9.7",
|
||||||
"@mikro-orm/migrations": "5.9.7",
|
"@mikro-orm/migrations": "5.9.7",
|
||||||
"@mikro-orm/postgresql": "5.9.7",
|
"@mikro-orm/postgresql": "5.9.7",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { CurrencyModuleService } from "@services"
|
import { CurrencyModuleService } from "@services"
|
||||||
import initialDataLoader from "./loaders/initial-data"
|
import initialDataLoader from "./loaders/initial-data"
|
||||||
import { Module, Modules } from "@medusajs/utils"
|
import { Module, Modules } from "@medusajs/framework/utils"
|
||||||
|
|
||||||
const service = CurrencyModuleService
|
const service = CurrencyModuleService
|
||||||
const loaders = [initialDataLoader]
|
const loaders = [initialDataLoader]
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
import { LoaderOptions, Logger, ModulesSdkTypes } from "@medusajs/types"
|
import {
|
||||||
import { ContainerRegistrationKeys, defaultCurrencies } from "@medusajs/utils"
|
LoaderOptions,
|
||||||
|
Logger,
|
||||||
|
ModulesSdkTypes,
|
||||||
|
} from "@medusajs/framework/types"
|
||||||
|
import {
|
||||||
|
ContainerRegistrationKeys,
|
||||||
|
defaultCurrencies,
|
||||||
|
} from "@medusajs/framework/utils"
|
||||||
import { Currency } from "@models"
|
import { Currency } from "@models"
|
||||||
|
|
||||||
export default async ({
|
export default async ({
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { model } from "@medusajs/utils"
|
import { model } from "@medusajs/framework/utils"
|
||||||
|
|
||||||
export default model.define("currency", {
|
export default model.define("currency", {
|
||||||
code: model.text().searchable().primaryKey(),
|
code: model.text().searchable().primaryKey(),
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ import {
|
|||||||
ICurrencyModuleService,
|
ICurrencyModuleService,
|
||||||
InternalModuleDeclaration,
|
InternalModuleDeclaration,
|
||||||
ModulesSdkTypes,
|
ModulesSdkTypes,
|
||||||
} from "@medusajs/types"
|
} from "@medusajs/framework/types"
|
||||||
|
|
||||||
import { MedusaService } from "@medusajs/utils"
|
import { MedusaService } from "@medusajs/framework/utils"
|
||||||
import { Currency } from "@models"
|
import { Currency } from "@models"
|
||||||
|
|
||||||
type InjectedDependencies = {
|
type InjectedDependencies = {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { IEventBusModuleService, Logger } from "@medusajs/types"
|
import { IEventBusModuleService, Logger } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export type InitializeModuleInjectableDependencies = {
|
export type InitializeModuleInjectableDependencies = {
|
||||||
logger?: Logger
|
logger?: Logger
|
||||||
|
|||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
import { ICustomerModuleService } from "@medusajs/types"
|
import { ICustomerModuleService } from "@medusajs/framework/types"
|
||||||
import { Module, Modules } from "@medusajs/utils"
|
import { Module, Modules } from "@medusajs/framework/utils"
|
||||||
import { CustomerModuleService } from "@services"
|
import { CustomerModuleService } from "@services"
|
||||||
import { moduleIntegrationTestRunner } from "medusa-test-utils"
|
import { moduleIntegrationTestRunner } from "medusa-test-utils"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as entities from "./src/models"
|
import * as entities from "./src/models"
|
||||||
import { defineMikroOrmCliConfig, Modules } from "@medusajs/utils"
|
import { defineMikroOrmCliConfig, Modules } from "@medusajs/framework/utils"
|
||||||
|
|
||||||
export default defineMikroOrmCliConfig(Modules.CUSTOMER, {
|
export default defineMikroOrmCliConfig(Modules.CUSTOMER, {
|
||||||
entities: Object.values(entities),
|
entities: Object.values(entities),
|
||||||
|
|||||||
@@ -37,7 +37,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": "^1.11.16",
|
"@medusajs/framework": "^0.0.1",
|
||||||
"@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",
|
||||||
@@ -47,10 +47,8 @@
|
|||||||
"tsc-alias": "^1.8.6",
|
"tsc-alias": "^1.8.6",
|
||||||
"typescript": "^5.6.2"
|
"typescript": "^5.6.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
|
||||||
"@medusajs/utils": "^1.11.9"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
|
"@medusajs/framework": "^0.0.1",
|
||||||
"@mikro-orm/core": "5.9.7",
|
"@mikro-orm/core": "5.9.7",
|
||||||
"@mikro-orm/migrations": "5.9.7",
|
"@mikro-orm/migrations": "5.9.7",
|
||||||
"@mikro-orm/postgresql": "5.9.7",
|
"@mikro-orm/postgresql": "5.9.7",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { CustomerModuleService } from "@services"
|
import { CustomerModuleService } from "@services"
|
||||||
import { Module, Modules } from "@medusajs/utils"
|
import { Module, Modules } from "@medusajs/framework/utils"
|
||||||
|
|
||||||
export default Module(Modules.CUSTOMER, {
|
export default Module(Modules.CUSTOMER, {
|
||||||
service: CustomerModuleService,
|
service: CustomerModuleService,
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
import { defineJoinerConfig, Modules } from "@medusajs/utils"
|
import { defineJoinerConfig, Modules } from "@medusajs/framework/utils"
|
||||||
|
|
||||||
export const joinerConfig = defineJoinerConfig(Modules.CUSTOMER)
|
export const joinerConfig = defineJoinerConfig(Modules.CUSTOMER)
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { DAL } from "@medusajs/types"
|
import { DAL } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
createPsqlIndexStatementHelper,
|
createPsqlIndexStatementHelper,
|
||||||
generateEntityId,
|
generateEntityId,
|
||||||
Searchable,
|
Searchable,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
BeforeCreate,
|
BeforeCreate,
|
||||||
Cascade,
|
Cascade,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { DAL } from "@medusajs/types"
|
import { DAL } from "@medusajs/framework/types"
|
||||||
import { generateEntityId } from "@medusajs/utils"
|
import { generateEntityId } from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
BeforeCreate,
|
BeforeCreate,
|
||||||
Cascade,
|
Cascade,
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { DAL } from "@medusajs/types"
|
import { DAL } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
DALUtils,
|
DALUtils,
|
||||||
Searchable,
|
Searchable,
|
||||||
createPsqlIndexStatementHelper,
|
createPsqlIndexStatementHelper,
|
||||||
generateEntityId,
|
generateEntityId,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
BeforeCreate,
|
BeforeCreate,
|
||||||
Collection,
|
Collection,
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { DAL } from "@medusajs/types"
|
import { DAL } from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
createPsqlIndexStatementHelper,
|
createPsqlIndexStatementHelper,
|
||||||
DALUtils,
|
DALUtils,
|
||||||
generateEntityId,
|
generateEntityId,
|
||||||
Searchable,
|
Searchable,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
BeforeCreate,
|
BeforeCreate,
|
||||||
Cascade,
|
Cascade,
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
InternalModuleDeclaration,
|
InternalModuleDeclaration,
|
||||||
ModuleJoinerConfig,
|
ModuleJoinerConfig,
|
||||||
ModulesSdkTypes,
|
ModulesSdkTypes,
|
||||||
} from "@medusajs/types"
|
} from "@medusajs/framework/types"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
InjectManager,
|
InjectManager,
|
||||||
@@ -18,7 +18,7 @@ import {
|
|||||||
isString,
|
isString,
|
||||||
MedusaContext,
|
MedusaContext,
|
||||||
MedusaService,
|
MedusaService,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import { EntityManager } from "@mikro-orm/core"
|
import { EntityManager } from "@mikro-orm/core"
|
||||||
import {
|
import {
|
||||||
Customer,
|
Customer,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Logger } from "@medusajs/types"
|
import { Logger } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export * as ServiceTypes from "./services"
|
export * as ServiceTypes from "./services"
|
||||||
export * from "./services"
|
export * from "./services"
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
"author": "Medusa",
|
"author": "Medusa",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@medusajs/types": "^1.11.12",
|
"@medusajs/framework": "^0.0.1",
|
||||||
"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",
|
||||||
@@ -34,11 +34,8 @@
|
|||||||
"build": "rimraf dist && tsc --build",
|
"build": "rimraf dist && tsc --build",
|
||||||
"test": "jest --passWithNoTests"
|
"test": "jest --passWithNoTests"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
|
||||||
"@medusajs/modules-sdk": "^1.12.11",
|
|
||||||
"@medusajs/utils": "^1.11.9"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
|
"@medusajs/framework": "^0.0.1",
|
||||||
"ulid": "^2.3.0"
|
"ulid": "^2.3.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { ModuleExports } from "@medusajs/types"
|
import { ModuleExports } from "@medusajs/framework/types"
|
||||||
import Loader from "./loaders"
|
import Loader from "./loaders"
|
||||||
import LocalEventBus from "./services/event-bus-local"
|
import LocalEventBus from "./services/event-bus-local"
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { MedusaModule } from "@medusajs/modules-sdk"
|
import { MedusaModule } from "@medusajs/framework/modules-sdk"
|
||||||
import { IEventBusService } from "@medusajs/types"
|
import { IEventBusService } from "@medusajs/framework/types"
|
||||||
import { Modules } from "@medusajs/utils"
|
import { Modules } from "@medusajs/framework/utils"
|
||||||
|
|
||||||
export const initialize = async (): Promise<IEventBusService> => {
|
export const initialize = async (): Promise<IEventBusService> => {
|
||||||
const serviceKey = Modules.EVENT_BUS
|
const serviceKey = Modules.EVENT_BUS
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { LoaderOptions } from "@medusajs/types"
|
import { LoaderOptions } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export default async ({ logger }: LoaderOptions): Promise<void> => {
|
export default async ({ logger }: LoaderOptions): Promise<void> => {
|
||||||
logger?.warn(
|
logger?.warn(
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import {
|
|||||||
MedusaContainer,
|
MedusaContainer,
|
||||||
Message,
|
Message,
|
||||||
Subscriber,
|
Subscriber,
|
||||||
} from "@medusajs/types"
|
} from "@medusajs/framework/types"
|
||||||
import { AbstractEventBusModuleService } from "@medusajs/utils"
|
import { AbstractEventBusModuleService } from "@medusajs/framework/utils"
|
||||||
import { EventEmitter } from "events"
|
import { EventEmitter } from "events"
|
||||||
import { ulid } from "ulid"
|
import { ulid } from "ulid"
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
"author": "Medusa",
|
"author": "Medusa",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@medusajs/types": "^1.11.16",
|
"@medusajs/framework": "^0.0.1",
|
||||||
"cross-env": "^5.2.1",
|
"cross-env": "^5.2.1",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"medusa-test-utils": "^1.1.44",
|
"medusa-test-utils": "^1.1.44",
|
||||||
@@ -36,12 +36,11 @@
|
|||||||
"test": "jest --silent --bail --maxWorkers=50% --forceExit"
|
"test": "jest --silent --bail --maxWorkers=50% --forceExit"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@medusajs/modules-sdk": "^1.12.11",
|
|
||||||
"@medusajs/utils": "^1.11.9",
|
|
||||||
"bullmq": "5.13.0",
|
"bullmq": "5.13.0",
|
||||||
"ioredis": "^5.4.1"
|
"ioredis": "^5.4.1"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
|
"@medusajs/framework": "^0.0.1",
|
||||||
"awilix": "^8.0.1"
|
"awilix": "^8.0.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { ModuleExports } from "@medusajs/types"
|
import { ModuleExports } from "@medusajs/framework/types"
|
||||||
import Loader from "./loaders"
|
import Loader from "./loaders"
|
||||||
import RedisEventBusService from "./services/event-bus-redis"
|
import RedisEventBusService from "./services/event-bus-redis"
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { MedusaModule } from "@medusajs/modules-sdk"
|
import { MedusaModule } from "@medusajs/framework/modules-sdk"
|
||||||
import {
|
import {
|
||||||
ExternalModuleDeclaration,
|
ExternalModuleDeclaration,
|
||||||
IEventBusService,
|
IEventBusService,
|
||||||
InternalModuleDeclaration,
|
InternalModuleDeclaration,
|
||||||
} from "@medusajs/types"
|
} from "@medusajs/framework/types"
|
||||||
import { Modules } from "@medusajs/utils"
|
import { Modules } from "@medusajs/framework/utils"
|
||||||
import { EventBusRedisModuleOptions } from "../types"
|
import { EventBusRedisModuleOptions } from "../types"
|
||||||
|
|
||||||
export const initialize = async (
|
export const initialize = async (
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { LoaderOptions } from "@medusajs/types"
|
import { LoaderOptions } from "@medusajs/framework/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,4 +1,4 @@
|
|||||||
import { Logger } from "@medusajs/types"
|
import { Logger } from "@medusajs/framework/types"
|
||||||
import { Queue, Worker } from "bullmq"
|
import { Queue, Worker } from "bullmq"
|
||||||
import { Redis } from "ioredis"
|
import { Redis } from "ioredis"
|
||||||
import RedisEventBusService from "../event-bus-redis"
|
import RedisEventBusService from "../event-bus-redis"
|
||||||
|
|||||||
@@ -3,12 +3,12 @@ import {
|
|||||||
InternalModuleDeclaration,
|
InternalModuleDeclaration,
|
||||||
Logger,
|
Logger,
|
||||||
Message,
|
Message,
|
||||||
} from "@medusajs/types"
|
} from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
AbstractEventBusModuleService,
|
AbstractEventBusModuleService,
|
||||||
isPresent,
|
isPresent,
|
||||||
promiseAll,
|
promiseAll,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import { BulkJobOptions, Queue, Worker } from "bullmq"
|
import { BulkJobOptions, Queue, Worker } from "bullmq"
|
||||||
import { Redis } from "ioredis"
|
import { Redis } from "ioredis"
|
||||||
import { BullJob, EventBusRedisModuleOptions, Options } from "../types"
|
import { BullJob, EventBusRedisModuleOptions, Options } from "../types"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { FileTypes } from "@medusajs/types"
|
import { FileTypes } from "@medusajs/framework/types"
|
||||||
import { AbstractFileProviderService } from "@medusajs/utils"
|
import { AbstractFileProviderService } from "@medusajs/framework/utils"
|
||||||
|
|
||||||
export class FileProviderServiceFixtures extends AbstractFileProviderService {
|
export class FileProviderServiceFixtures extends AbstractFileProviderService {
|
||||||
static identifier = "fixtures-file-provider"
|
static identifier = "fixtures-file-provider"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { resolve } from "path"
|
import { resolve } from "path"
|
||||||
import { moduleIntegrationTestRunner } from "medusa-test-utils"
|
import { moduleIntegrationTestRunner } from "medusa-test-utils"
|
||||||
import { IFileModuleService } from "@medusajs/types"
|
import { IFileModuleService } from "@medusajs/framework/types"
|
||||||
import { Module, Modules } from "@medusajs/utils"
|
import { Module, Modules } from "@medusajs/framework/utils"
|
||||||
import { FileModuleService } from "@services"
|
import { FileModuleService } from "@services"
|
||||||
|
|
||||||
jest.setTimeout(100000)
|
jest.setTimeout(100000)
|
||||||
|
|||||||
@@ -37,7 +37,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": "^1.11.15",
|
"@medusajs/framework": "^0.0.1",
|
||||||
"@mikro-orm/cli": "5.9.7",
|
"@mikro-orm/cli": "5.9.7",
|
||||||
"cross-env": "^5.2.1",
|
"cross-env": "^5.2.1",
|
||||||
"faker": "^5.5.3",
|
"faker": "^5.5.3",
|
||||||
@@ -49,11 +49,8 @@
|
|||||||
"tsc-alias": "^1.8.6",
|
"tsc-alias": "^1.8.6",
|
||||||
"typescript": "^5.6.2"
|
"typescript": "^5.6.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
|
||||||
"@medusajs/modules-sdk": "^1.12.11",
|
|
||||||
"@medusajs/utils": "^1.11.9"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
|
"@medusajs/framework": "^0.0.1",
|
||||||
"@mikro-orm/core": "5.9.7",
|
"@mikro-orm/core": "5.9.7",
|
||||||
"@mikro-orm/migrations": "5.9.7",
|
"@mikro-orm/migrations": "5.9.7",
|
||||||
"@mikro-orm/postgresql": "5.9.7",
|
"@mikro-orm/postgresql": "5.9.7",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { FileModuleService } from "@services"
|
import { FileModuleService } from "@services"
|
||||||
import loadProviders from "./loaders/providers"
|
import loadProviders from "./loaders/providers"
|
||||||
import { Module, Modules } from "@medusajs/utils"
|
import { Module, Modules } from "@medusajs/framework/utils"
|
||||||
|
|
||||||
export default Module(Modules.FILE, {
|
export default Module(Modules.FILE, {
|
||||||
service: FileModuleService,
|
service: FileModuleService,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { defineJoinerConfig, Modules } from "@medusajs/utils"
|
import { defineJoinerConfig, Modules } from "@medusajs/framework/utils"
|
||||||
|
|
||||||
export const joinerConfig = defineJoinerConfig(Modules.FILE, {
|
export const joinerConfig = defineJoinerConfig(Modules.FILE, {
|
||||||
models: [{ name: "File" }],
|
models: [{ name: "File" }],
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
import { moduleProviderLoader } from "@medusajs/modules-sdk"
|
import { moduleProviderLoader } from "@medusajs/framework/modules-sdk"
|
||||||
import { LoaderOptions, ModuleProvider, ModulesSdkTypes } from "@medusajs/types"
|
import {
|
||||||
|
LoaderOptions,
|
||||||
|
ModuleProvider,
|
||||||
|
ModulesSdkTypes,
|
||||||
|
} from "@medusajs/framework/types"
|
||||||
import { FileProviderService } from "@services"
|
import { FileProviderService } from "@services"
|
||||||
import {
|
import {
|
||||||
FileProviderIdentifierRegistrationName,
|
FileProviderIdentifierRegistrationName,
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ import {
|
|||||||
FilterableFileProps,
|
FilterableFileProps,
|
||||||
FindConfig,
|
FindConfig,
|
||||||
ModuleJoinerConfig,
|
ModuleJoinerConfig,
|
||||||
} from "@medusajs/types"
|
} from "@medusajs/framework/types"
|
||||||
|
|
||||||
import { joinerConfig } from "../joiner-config"
|
import { joinerConfig } from "../joiner-config"
|
||||||
import FileProviderService from "./file-provider-service"
|
import FileProviderService from "./file-provider-service"
|
||||||
import { MedusaError } from "@medusajs/utils"
|
import { MedusaError } from "@medusajs/framework/utils"
|
||||||
|
|
||||||
type InjectedDependencies = {
|
type InjectedDependencies = {
|
||||||
fileProviderService: FileProviderService
|
fileProviderService: FileProviderService
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Constructor, FileTypes } from "@medusajs/types"
|
import { Constructor, FileTypes } from "@medusajs/framework/types"
|
||||||
import { MedusaError } from "@medusajs/utils"
|
import { MedusaError } from "@medusajs/framework/utils"
|
||||||
import { FileProviderRegistrationPrefix } from "@types"
|
import { FileProviderRegistrationPrefix } from "@types"
|
||||||
|
|
||||||
type InjectedDependencies = {
|
type InjectedDependencies = {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
ModuleProviderExports,
|
ModuleProviderExports,
|
||||||
ModuleServiceInitializeOptions,
|
ModuleServiceInitializeOptions,
|
||||||
} from "@medusajs/types"
|
} from "@medusajs/framework/types"
|
||||||
|
|
||||||
export const FileProviderIdentifierRegistrationName =
|
export const FileProviderIdentifierRegistrationName =
|
||||||
"file_providers_identifier"
|
"file_providers_identifier"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { EventBusTypes } from "@medusajs/types"
|
import { EventBusTypes } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export function buildExpectedEventMessageShape(options: {
|
export function buildExpectedEventMessageShape(options: {
|
||||||
eventName: string
|
eventName: string
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { CreateFulfillmentDTO } from "@medusajs/types"
|
import { CreateFulfillmentDTO } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export function generateCreateFulfillmentData(
|
export function generateCreateFulfillmentData(
|
||||||
data: Partial<CreateFulfillmentDTO> & {
|
data: Partial<CreateFulfillmentDTO> & {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { generateCreateShippingOptionsData } from "./shipping-options"
|
import { generateCreateShippingOptionsData } from "./shipping-options"
|
||||||
import { generateCreateFulfillmentData } from "./fulfillment"
|
import { generateCreateFulfillmentData } from "./fulfillment"
|
||||||
import { IFulfillmentModuleService } from "@medusajs/types"
|
import { IFulfillmentModuleService } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export * from "./shipping-options"
|
export * from "./shipping-options"
|
||||||
export * from "./fulfillment"
|
export * from "./fulfillment"
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user