chore(): Move dependencies around (#9278)
RESOLVES FRMW-2716 [1] **What** First stab at re organising dependencies in the modules and their usage.
This commit is contained in:
@@ -18,7 +18,12 @@
|
|||||||
"./subscribers": "./dist/subscribers/index.js",
|
"./subscribers": "./dist/subscribers/index.js",
|
||||||
"./workflows": "./dist/workflows/index.js",
|
"./workflows": "./dist/workflows/index.js",
|
||||||
"./links": "./dist/links/index.js",
|
"./links": "./dist/links/index.js",
|
||||||
"./jobs": "./dist/jobs/index.js"
|
"./jobs": "./dist/jobs/index.js",
|
||||||
|
"./utils": "./dist/utils/index.js",
|
||||||
|
"./types": "./dist/types/index.js",
|
||||||
|
"./orchestration": "./dist/orchestration/index.js",
|
||||||
|
"./workflows-sdk": "./dist/workflows-sdk/index.js",
|
||||||
|
"./workflows-sdk/composer": "./dist/workflows-sdk/composer.js"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=20"
|
"node": ">=20"
|
||||||
@@ -40,7 +45,6 @@
|
|||||||
"test": "jest --runInBand --bail --passWithNoTests --forceExit"
|
"test": "jest --runInBand --bail --passWithNoTests --forceExit"
|
||||||
},
|
},
|
||||||
"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",
|
||||||
@@ -55,6 +59,7 @@
|
|||||||
"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",
|
||||||
"@opentelemetry/api": "^1.9.0",
|
"@opentelemetry/api": "^1.9.0",
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
export * from "@medusajs/orchestration"
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export * from "@medusajs/types"
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export * from "@medusajs/utils"
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export * from "@medusajs/workflows-sdk/composer"
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export * from "@medusajs/workflows-sdk"
|
||||||
+1
-1
@@ -2,7 +2,7 @@ import {
|
|||||||
createStep,
|
createStep,
|
||||||
createWorkflow,
|
createWorkflow,
|
||||||
StepResponse,
|
StepResponse,
|
||||||
} from "@medusajs/workflows-sdk"
|
} from "@medusajs/framework/workflows-sdk"
|
||||||
|
|
||||||
const step_1 = createStep(
|
const step_1 = createStep(
|
||||||
"step_1",
|
"step_1",
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ import {
|
|||||||
createStep,
|
createStep,
|
||||||
createWorkflow,
|
createWorkflow,
|
||||||
StepResponse,
|
StepResponse,
|
||||||
} from "@medusajs/workflows-sdk"
|
} from "@medusajs/framework/workflows-sdk"
|
||||||
|
|
||||||
const step_1 = createStep(
|
const step_1 = createStep(
|
||||||
"step_1",
|
"step_1",
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ import {
|
|||||||
createStep,
|
createStep,
|
||||||
createWorkflow,
|
createWorkflow,
|
||||||
parallelize,
|
parallelize,
|
||||||
} from "@medusajs/workflows-sdk"
|
} from "@medusajs/framework/workflows-sdk"
|
||||||
import { setTimeout } from "timers/promises"
|
import { setTimeout } from "timers/promises"
|
||||||
|
|
||||||
const step_1_background = createStep(
|
const step_1_background = createStep(
|
||||||
|
|||||||
+2
-2
@@ -2,8 +2,8 @@ import {
|
|||||||
createStep,
|
createStep,
|
||||||
createWorkflow,
|
createWorkflow,
|
||||||
StepResponse,
|
StepResponse,
|
||||||
} from "@medusajs/workflows-sdk"
|
} from "@medusajs/framework/workflows-sdk"
|
||||||
import { when } from "@medusajs/workflows-sdk/composer"
|
import { when } from "@medusajs/framework/workflows-sdk/composer"
|
||||||
|
|
||||||
const step_1 = createStep(
|
const step_1 = createStep(
|
||||||
"step_1",
|
"step_1",
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { createStep, createWorkflow } from "@medusajs/workflows-sdk"
|
import { createStep, createWorkflow } from "@medusajs/framework/workflows-sdk"
|
||||||
import { setTimeout } from "timers/promises"
|
import { setTimeout } from "timers/promises"
|
||||||
|
|
||||||
export const workflowEventGroupIdStep1Mock = jest.fn(async (input) => {
|
export const workflowEventGroupIdStep1Mock = jest.fn(async (input) => {
|
||||||
|
|||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
import {
|
import {
|
||||||
StepResponse,
|
|
||||||
createStep,
|
createStep,
|
||||||
createWorkflow,
|
createWorkflow,
|
||||||
} from "@medusajs/workflows-sdk"
|
StepResponse,
|
||||||
|
} from "@medusajs/framework/workflows-sdk"
|
||||||
|
|
||||||
const step_1 = createStep(
|
const step_1 = createStep(
|
||||||
"step_1",
|
"step_1",
|
||||||
|
|||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
import { SchedulerOptions } from "@medusajs/orchestration"
|
import { SchedulerOptions } from "@medusajs/framework/orchestration"
|
||||||
import {
|
import {
|
||||||
createStep,
|
createStep,
|
||||||
createWorkflow,
|
createWorkflow,
|
||||||
StepResponse,
|
StepResponse,
|
||||||
} from "@medusajs/workflows-sdk"
|
} from "@medusajs/framework/workflows-sdk"
|
||||||
|
|
||||||
export const createScheduled = (name: string, schedule?: SchedulerOptions) => {
|
export const createScheduled = (name: string, schedule?: SchedulerOptions) => {
|
||||||
const workflowScheduledStepInvoke = jest.fn((input, { container }) => {
|
const workflowScheduledStepInvoke = jest.fn((input, { container }) => {
|
||||||
|
|||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
import {
|
import {
|
||||||
StepResponse,
|
|
||||||
createStep,
|
createStep,
|
||||||
createWorkflow,
|
createWorkflow,
|
||||||
} from "@medusajs/workflows-sdk"
|
StepResponse,
|
||||||
|
} from "@medusajs/framework/workflows-sdk"
|
||||||
import { setTimeout } from "timers/promises"
|
import { setTimeout } from "timers/promises"
|
||||||
|
|
||||||
const step_1 = createStep(
|
const step_1 = createStep(
|
||||||
|
|||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
import {
|
import {
|
||||||
StepResponse,
|
|
||||||
createStep,
|
createStep,
|
||||||
createWorkflow,
|
createWorkflow,
|
||||||
} from "@medusajs/workflows-sdk"
|
StepResponse,
|
||||||
|
} from "@medusajs/framework/workflows-sdk"
|
||||||
|
|
||||||
const step_1 = createStep(
|
const step_1 = createStep(
|
||||||
"step_1",
|
"step_1",
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
import { WorkflowManager } from "@medusajs/orchestration"
|
import { WorkflowManager } from "@medusajs/framework/orchestration"
|
||||||
import {
|
import {
|
||||||
Context,
|
Context,
|
||||||
IWorkflowEngineService,
|
IWorkflowEngineService,
|
||||||
RemoteQueryFunction,
|
RemoteQueryFunction,
|
||||||
} from "@medusajs/types"
|
} from "@medusajs/framework/types"
|
||||||
import { Module, Modules, TransactionHandlerType } from "@medusajs/utils"
|
import {
|
||||||
|
Module,
|
||||||
|
Modules,
|
||||||
|
TransactionHandlerType,
|
||||||
|
} from "@medusajs/framework/utils"
|
||||||
import { WorkflowsModuleService } from "@services"
|
import { WorkflowsModuleService } from "@services"
|
||||||
import { asFunction } from "awilix"
|
import { asFunction } from "awilix"
|
||||||
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.WORKFLOW_ENGINE, {
|
export default defineMikroOrmCliConfig(Modules.WORKFLOW_ENGINE, {
|
||||||
|
|||||||
@@ -48,9 +48,7 @@
|
|||||||
"typescript": "^5.6.2"
|
"typescript": "^5.6.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@medusajs/orchestration": "^0.5.7",
|
"@medusajs/framework": "^0.0.1",
|
||||||
"@medusajs/utils": "^1.11.9",
|
|
||||||
"@medusajs/workflows-sdk": "^0.1.6",
|
|
||||||
"cron-parser": "^4.9.0"
|
"cron-parser": "^4.9.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Module, Modules } from "@medusajs/utils"
|
import { Module, Modules } from "@medusajs/framework/utils"
|
||||||
import { WorkflowsModuleService } from "@services"
|
import { WorkflowsModuleService } from "@services"
|
||||||
import { loadUtils } from "./loaders"
|
import { loadUtils } from "./loaders"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { TransactionState } from "@medusajs/orchestration"
|
import { TransactionState } from "@medusajs/framework/orchestration"
|
||||||
import { DALUtils, generateEntityId } from "@medusajs/utils"
|
import { DALUtils, generateEntityId } from "@medusajs/framework/utils"
|
||||||
import {
|
import {
|
||||||
BeforeCreate,
|
BeforeCreate,
|
||||||
Entity,
|
Entity,
|
||||||
|
|||||||
@@ -5,21 +5,25 @@ import {
|
|||||||
TransactionHandlerType,
|
TransactionHandlerType,
|
||||||
TransactionStep,
|
TransactionStep,
|
||||||
WorkflowScheduler,
|
WorkflowScheduler,
|
||||||
} from "@medusajs/orchestration"
|
} from "@medusajs/framework/orchestration"
|
||||||
import { ContainerLike, Context, MedusaContainer } from "@medusajs/types"
|
import {
|
||||||
|
ContainerLike,
|
||||||
|
Context,
|
||||||
|
MedusaContainer,
|
||||||
|
} from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
InjectSharedContext,
|
InjectSharedContext,
|
||||||
|
isString,
|
||||||
MedusaContext,
|
MedusaContext,
|
||||||
MedusaError,
|
MedusaError,
|
||||||
TransactionState,
|
TransactionState,
|
||||||
isString,
|
} from "@medusajs/framework/utils"
|
||||||
} from "@medusajs/utils"
|
|
||||||
import {
|
import {
|
||||||
MedusaWorkflow,
|
|
||||||
ReturnWorkflow,
|
|
||||||
resolveValue,
|
|
||||||
type FlowRunOptions,
|
type FlowRunOptions,
|
||||||
} from "@medusajs/workflows-sdk"
|
MedusaWorkflow,
|
||||||
|
resolveValue,
|
||||||
|
ReturnWorkflow,
|
||||||
|
} from "@medusajs/framework/workflows-sdk"
|
||||||
import { ulid } from "ulid"
|
import { ulid } from "ulid"
|
||||||
import { InMemoryDistributedTransactionStorage } from "../utils"
|
import { InMemoryDistributedTransactionStorage } from "../utils"
|
||||||
|
|
||||||
|
|||||||
@@ -5,16 +5,16 @@ import {
|
|||||||
MedusaContainer,
|
MedusaContainer,
|
||||||
ModulesSdkTypes,
|
ModulesSdkTypes,
|
||||||
WorkflowsSdkTypes,
|
WorkflowsSdkTypes,
|
||||||
} from "@medusajs/types"
|
} from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
InjectSharedContext,
|
InjectSharedContext,
|
||||||
MedusaContext,
|
MedusaContext,
|
||||||
ModulesSdkUtils,
|
ModulesSdkUtils,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import type {
|
import type {
|
||||||
ReturnWorkflow,
|
ReturnWorkflow,
|
||||||
UnwrapWorkflowInputDataType,
|
UnwrapWorkflowInputDataType,
|
||||||
} from "@medusajs/workflows-sdk"
|
} from "@medusajs/framework/workflows-sdk"
|
||||||
import { WorkflowExecution } from "@models"
|
import { WorkflowExecution } from "@models"
|
||||||
import { WorkflowOrchestratorService } from "@services"
|
import { WorkflowOrchestratorService } from "@services"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Logger } from "@medusajs/types"
|
import { Logger } from "@medusajs/framework/types"
|
||||||
|
|
||||||
export type InitializeModuleInjectableDependencies = {
|
export type InitializeModuleInjectableDependencies = {
|
||||||
logger?: Logger
|
logger?: Logger
|
||||||
|
|||||||
+3
-3
@@ -6,9 +6,9 @@ import {
|
|||||||
TransactionCheckpoint,
|
TransactionCheckpoint,
|
||||||
TransactionOptions,
|
TransactionOptions,
|
||||||
TransactionStep,
|
TransactionStep,
|
||||||
} from "@medusajs/orchestration"
|
} from "@medusajs/framework/orchestration"
|
||||||
import { Logger, ModulesSdkTypes } from "@medusajs/types"
|
import { Logger, ModulesSdkTypes } from "@medusajs/framework/types"
|
||||||
import { MedusaError, TransactionState } from "@medusajs/utils"
|
import { MedusaError, TransactionState } from "@medusajs/framework/utils"
|
||||||
import { WorkflowOrchestratorService } from "@services"
|
import { WorkflowOrchestratorService } from "@services"
|
||||||
import { CronExpression, parseExpression } from "cron-parser"
|
import { CronExpression, parseExpression } from "cron-parser"
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import {
|
import {
|
||||||
StepResponse,
|
|
||||||
createStep,
|
createStep,
|
||||||
createWorkflow,
|
createWorkflow,
|
||||||
} from "@medusajs/workflows-sdk"
|
StepResponse,
|
||||||
|
} from "@medusajs/framework/workflows-sdk"
|
||||||
|
|
||||||
const step_1 = createStep(
|
const step_1 = createStep(
|
||||||
"step_1",
|
"step_1",
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import {
|
import {
|
||||||
StepResponse,
|
|
||||||
createStep,
|
createStep,
|
||||||
createWorkflow,
|
createWorkflow,
|
||||||
} from "@medusajs/workflows-sdk"
|
StepResponse,
|
||||||
|
} from "@medusajs/framework/workflows-sdk"
|
||||||
|
|
||||||
const step_1 = createStep(
|
const step_1 = createStep(
|
||||||
"step_1",
|
"step_1",
|
||||||
|
|||||||
+3
-3
@@ -1,10 +1,10 @@
|
|||||||
import {
|
import {
|
||||||
StepResponse,
|
|
||||||
WorkflowResponse,
|
|
||||||
createStep,
|
createStep,
|
||||||
createWorkflow,
|
createWorkflow,
|
||||||
parallelize,
|
parallelize,
|
||||||
} from "@medusajs/workflows-sdk"
|
StepResponse,
|
||||||
|
WorkflowResponse,
|
||||||
|
} from "@medusajs/framework/workflows-sdk"
|
||||||
import { setTimeout } from "timers/promises"
|
import { setTimeout } from "timers/promises"
|
||||||
|
|
||||||
const step_1_background = createStep(
|
const step_1_background = createStep(
|
||||||
|
|||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
import { SchedulerOptions } from "@medusajs/orchestration"
|
import { SchedulerOptions } from "@medusajs/framework/orchestration"
|
||||||
import {
|
import {
|
||||||
createStep,
|
createStep,
|
||||||
createWorkflow,
|
createWorkflow,
|
||||||
StepResponse,
|
StepResponse,
|
||||||
} from "@medusajs/workflows-sdk"
|
} from "@medusajs/framework/workflows-sdk"
|
||||||
|
|
||||||
export const createScheduled = (
|
export const createScheduled = (
|
||||||
name: string,
|
name: string,
|
||||||
|
|||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
import {
|
import {
|
||||||
StepResponse,
|
|
||||||
createStep,
|
createStep,
|
||||||
createWorkflow,
|
createWorkflow,
|
||||||
} from "@medusajs/workflows-sdk"
|
StepResponse,
|
||||||
|
} from "@medusajs/framework/workflows-sdk"
|
||||||
import { setTimeout } from "timers/promises"
|
import { setTimeout } from "timers/promises"
|
||||||
|
|
||||||
const step_1 = createStep(
|
const step_1 = createStep(
|
||||||
|
|||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
import {
|
import {
|
||||||
StepResponse,
|
|
||||||
createStep,
|
createStep,
|
||||||
createWorkflow,
|
createWorkflow,
|
||||||
} from "@medusajs/workflows-sdk"
|
StepResponse,
|
||||||
|
} from "@medusajs/framework/workflows-sdk"
|
||||||
import { setTimeout } from "timers/promises"
|
import { setTimeout } from "timers/promises"
|
||||||
|
|
||||||
const step_1 = createStep(
|
const step_1 = createStep(
|
||||||
|
|||||||
@@ -2,26 +2,26 @@ import {
|
|||||||
TransactionStepTimeoutError,
|
TransactionStepTimeoutError,
|
||||||
TransactionTimeoutError,
|
TransactionTimeoutError,
|
||||||
WorkflowManager,
|
WorkflowManager,
|
||||||
} from "@medusajs/orchestration"
|
} from "@medusajs/framework/orchestration"
|
||||||
import {
|
import {
|
||||||
IWorkflowEngineService,
|
IWorkflowEngineService,
|
||||||
MedusaContainer,
|
MedusaContainer,
|
||||||
RemoteQueryFunction,
|
RemoteQueryFunction,
|
||||||
} from "@medusajs/types"
|
} from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
Module,
|
Module,
|
||||||
Modules,
|
Modules,
|
||||||
TransactionHandlerType,
|
TransactionHandlerType,
|
||||||
TransactionStepState,
|
TransactionStepState,
|
||||||
} from "@medusajs/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import { WorkflowsModuleService } from "@medusajs/workflow-engine-inmemory/dist/services"
|
|
||||||
import { asValue } from "awilix"
|
import { asValue } from "awilix"
|
||||||
import { moduleIntegrationTestRunner } from "medusa-test-utils"
|
import { moduleIntegrationTestRunner } from "medusa-test-utils"
|
||||||
import { setTimeout } from "timers/promises"
|
import { setTimeout } from "timers/promises"
|
||||||
import "../__fixtures__"
|
import "../__fixtures__"
|
||||||
import { createScheduled } from "../__fixtures__/workflow_scheduled"
|
import { createScheduled } from "../__fixtures__/workflow_scheduled"
|
||||||
import { TestDatabase } from "../utils"
|
import { TestDatabase } from "../utils"
|
||||||
|
import { WorkflowsModuleService } from "../../src/services"
|
||||||
|
|
||||||
jest.setTimeout(999900000)
|
jest.setTimeout(999900000)
|
||||||
|
|
||||||
|
|||||||
@@ -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.WORKFLOW_ENGINE, {
|
export default defineMikroOrmCliConfig(Modules.WORKFLOW_ENGINE, {
|
||||||
|
|||||||
@@ -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",
|
||||||
@@ -48,9 +47,7 @@
|
|||||||
"typescript": "^5.6.2"
|
"typescript": "^5.6.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@medusajs/orchestration": "^0.5.7",
|
"@medusajs/framework": "^0.0.1",
|
||||||
"@medusajs/utils": "^1.11.9",
|
|
||||||
"@medusajs/workflows-sdk": "^0.1.6",
|
|
||||||
"bullmq": "5.13.0",
|
"bullmq": "5.13.0",
|
||||||
"ioredis": "^5.4.1"
|
"ioredis": "^5.4.1"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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 { RedisWorkflowsOptions } from "../types"
|
import { RedisWorkflowsOptions } from "../types"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { TransactionState } from "@medusajs/orchestration"
|
import { TransactionState } from "@medusajs/framework/orchestration"
|
||||||
import { DALUtils, generateEntityId } from "@medusajs/utils"
|
import { DALUtils, generateEntityId } from "@medusajs/utils"
|
||||||
import {
|
import {
|
||||||
BeforeCreate,
|
BeforeCreate,
|
||||||
|
|||||||
@@ -5,25 +5,24 @@ import {
|
|||||||
TransactionHandlerType,
|
TransactionHandlerType,
|
||||||
TransactionStep,
|
TransactionStep,
|
||||||
WorkflowScheduler,
|
WorkflowScheduler,
|
||||||
} from "@medusajs/orchestration"
|
} from "@medusajs/framework/orchestration"
|
||||||
import {
|
import {
|
||||||
ContainerLike,
|
ContainerLike,
|
||||||
Context,
|
Context,
|
||||||
Logger,
|
|
||||||
MedusaContainer,
|
MedusaContainer,
|
||||||
} from "@medusajs/types"
|
} from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
InjectSharedContext,
|
InjectSharedContext,
|
||||||
|
isString,
|
||||||
MedusaContext,
|
MedusaContext,
|
||||||
TransactionState,
|
TransactionState,
|
||||||
isString,
|
} from "@medusajs/framework/utils"
|
||||||
} from "@medusajs/utils"
|
|
||||||
import {
|
import {
|
||||||
FlowRunOptions,
|
FlowRunOptions,
|
||||||
MedusaWorkflow,
|
MedusaWorkflow,
|
||||||
ReturnWorkflow,
|
|
||||||
resolveValue,
|
resolveValue,
|
||||||
} from "@medusajs/workflows-sdk"
|
ReturnWorkflow,
|
||||||
|
} from "@medusajs/framework/workflows-sdk"
|
||||||
import Redis from "ioredis"
|
import Redis from "ioredis"
|
||||||
import { ulid } from "ulid"
|
import { ulid } from "ulid"
|
||||||
import type { RedisDistributedTransactionStorage } from "../utils"
|
import type { RedisDistributedTransactionStorage } from "../utils"
|
||||||
@@ -107,7 +106,6 @@ export class WorkflowOrchestratorService {
|
|||||||
workflowOrchestratorService: WorkflowOrchestratorService
|
workflowOrchestratorService: WorkflowOrchestratorService
|
||||||
redisPublisher: Redis
|
redisPublisher: Redis
|
||||||
redisSubscriber: Redis
|
redisSubscriber: Redis
|
||||||
logger: Logger
|
|
||||||
sharedContainer: MedusaContainer
|
sharedContainer: MedusaContainer
|
||||||
}) {
|
}) {
|
||||||
this.container_ = sharedContainer
|
this.container_ = sharedContainer
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
InternalModuleDeclaration,
|
InternalModuleDeclaration,
|
||||||
ModulesSdkTypes,
|
ModulesSdkTypes,
|
||||||
WorkflowsSdkTypes,
|
WorkflowsSdkTypes,
|
||||||
} from "@medusajs/types"
|
} from "@medusajs/framework/types"
|
||||||
import {
|
import {
|
||||||
InjectSharedContext,
|
InjectSharedContext,
|
||||||
MedusaContext,
|
MedusaContext,
|
||||||
@@ -13,7 +13,7 @@ import {
|
|||||||
import type {
|
import type {
|
||||||
ReturnWorkflow,
|
ReturnWorkflow,
|
||||||
UnwrapWorkflowInputDataType,
|
UnwrapWorkflowInputDataType,
|
||||||
} from "@medusajs/workflows-sdk"
|
} from "@medusajs/framework/workflows-sdk"
|
||||||
import { WorkflowExecution } from "@models"
|
import { WorkflowExecution } from "@models"
|
||||||
import { WorkflowOrchestratorService } from "@services"
|
import { WorkflowOrchestratorService } from "@services"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Logger } from "@medusajs/types"
|
import { Logger } from "@medusajs/framework/types"
|
||||||
import { RedisOptions } from "ioredis"
|
import { RedisOptions } from "ioredis"
|
||||||
|
|
||||||
export type InitializeModuleInjectableDependencies = {
|
export type InitializeModuleInjectableDependencies = {
|
||||||
|
|||||||
@@ -7,9 +7,13 @@ import {
|
|||||||
TransactionCheckpoint,
|
TransactionCheckpoint,
|
||||||
TransactionOptions,
|
TransactionOptions,
|
||||||
TransactionStep,
|
TransactionStep,
|
||||||
} from "@medusajs/orchestration"
|
} from "@medusajs/framework/orchestration"
|
||||||
import { Logger, ModulesSdkTypes } from "@medusajs/types"
|
import { Logger, ModulesSdkTypes } from "@medusajs/framework/types"
|
||||||
import { MedusaError, TransactionState, promiseAll } from "@medusajs/utils"
|
import {
|
||||||
|
MedusaError,
|
||||||
|
promiseAll,
|
||||||
|
TransactionState,
|
||||||
|
} from "@medusajs/framework/utils"
|
||||||
import { WorkflowOrchestratorService } from "@services"
|
import { WorkflowOrchestratorService } from "@services"
|
||||||
import { Queue, Worker } from "bullmq"
|
import { Queue, Worker } from "bullmq"
|
||||||
import Redis from "ioredis"
|
import Redis from "ioredis"
|
||||||
|
|||||||
@@ -6769,10 +6769,8 @@ __metadata:
|
|||||||
version: 0.0.0-use.local
|
version: 0.0.0-use.local
|
||||||
resolution: "@medusajs/workflow-engine-inmemory@workspace:packages/modules/workflow-engine-inmemory"
|
resolution: "@medusajs/workflow-engine-inmemory@workspace:packages/modules/workflow-engine-inmemory"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@medusajs/orchestration": ^0.5.7
|
"@medusajs/framework": ^0.0.1
|
||||||
"@medusajs/types": ^1.11.16
|
"@medusajs/types": ^1.11.16
|
||||||
"@medusajs/utils": ^1.11.9
|
|
||||||
"@medusajs/workflows-sdk": ^0.1.6
|
|
||||||
"@mikro-orm/cli": 5.9.7
|
"@mikro-orm/cli": 5.9.7
|
||||||
cron-parser: ^4.9.0
|
cron-parser: ^4.9.0
|
||||||
cross-env: ^5.2.1
|
cross-env: ^5.2.1
|
||||||
@@ -6794,10 +6792,7 @@ __metadata:
|
|||||||
version: 0.0.0-use.local
|
version: 0.0.0-use.local
|
||||||
resolution: "@medusajs/workflow-engine-redis@workspace:packages/modules/workflow-engine-redis"
|
resolution: "@medusajs/workflow-engine-redis@workspace:packages/modules/workflow-engine-redis"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@medusajs/orchestration": ^0.5.7
|
"@medusajs/framework": ^0.0.1
|
||||||
"@medusajs/types": ^1.11.16
|
|
||||||
"@medusajs/utils": ^1.11.9
|
|
||||||
"@medusajs/workflows-sdk": ^0.1.6
|
|
||||||
"@mikro-orm/cli": 5.9.7
|
"@mikro-orm/cli": 5.9.7
|
||||||
bullmq: 5.13.0
|
bullmq: 5.13.0
|
||||||
cross-env: ^5.2.1
|
cross-env: ^5.2.1
|
||||||
|
|||||||
Reference in New Issue
Block a user