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:
committed by
GitHub
parent
bb342d46f6
commit
6937d74252
@@ -1,8 +1,8 @@
|
||||
import {
|
||||
StepResponse,
|
||||
createStep,
|
||||
createWorkflow,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
StepResponse,
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
const step_1 = createStep(
|
||||
"step_1",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {
|
||||
StepResponse,
|
||||
createStep,
|
||||
createWorkflow,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
StepResponse,
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
const step_1 = createStep(
|
||||
"step_1",
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import {
|
||||
StepResponse,
|
||||
WorkflowResponse,
|
||||
createStep,
|
||||
createWorkflow,
|
||||
parallelize,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
StepResponse,
|
||||
WorkflowResponse,
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { setTimeout } from "timers/promises"
|
||||
|
||||
const step_1_background = createStep(
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { SchedulerOptions } from "@medusajs/orchestration"
|
||||
import { SchedulerOptions } from "@medusajs/framework/orchestration"
|
||||
import {
|
||||
createStep,
|
||||
createWorkflow,
|
||||
StepResponse,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
export const createScheduled = (
|
||||
name: string,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {
|
||||
StepResponse,
|
||||
createStep,
|
||||
createWorkflow,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
StepResponse,
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { setTimeout } from "timers/promises"
|
||||
|
||||
const step_1 = createStep(
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {
|
||||
StepResponse,
|
||||
createStep,
|
||||
createWorkflow,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
StepResponse,
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { setTimeout } from "timers/promises"
|
||||
|
||||
const step_1 = createStep(
|
||||
|
||||
@@ -2,26 +2,26 @@ import {
|
||||
TransactionStepTimeoutError,
|
||||
TransactionTimeoutError,
|
||||
WorkflowManager,
|
||||
} from "@medusajs/orchestration"
|
||||
} from "@medusajs/framework/orchestration"
|
||||
import {
|
||||
IWorkflowEngineService,
|
||||
MedusaContainer,
|
||||
RemoteQueryFunction,
|
||||
} from "@medusajs/types"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
Module,
|
||||
Modules,
|
||||
TransactionHandlerType,
|
||||
TransactionStepState,
|
||||
} from "@medusajs/utils"
|
||||
import { WorkflowsModuleService } from "@medusajs/workflow-engine-inmemory/dist/services"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { asValue } from "awilix"
|
||||
import { moduleIntegrationTestRunner } from "medusa-test-utils"
|
||||
import { setTimeout } from "timers/promises"
|
||||
import "../__fixtures__"
|
||||
import { createScheduled } from "../__fixtures__/workflow_scheduled"
|
||||
import { TestDatabase } from "../utils"
|
||||
import { WorkflowsModuleService } from "../../src/services"
|
||||
|
||||
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"
|
||||
|
||||
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"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@medusajs/types": "^1.11.16",
|
||||
"@mikro-orm/cli": "5.9.7",
|
||||
"cross-env": "^5.2.1",
|
||||
"jest": "^29.7.0",
|
||||
@@ -48,9 +47,7 @@
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@medusajs/orchestration": "^0.5.7",
|
||||
"@medusajs/utils": "^1.11.9",
|
||||
"@medusajs/workflows-sdk": "^0.1.6",
|
||||
"@medusajs/framework": "^0.0.1",
|
||||
"bullmq": "5.13.0",
|
||||
"ioredis": "^5.4.1"
|
||||
},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { LoaderOptions } from "@medusajs/types"
|
||||
import { LoaderOptions } from "@medusajs/framework/types"
|
||||
import { asValue } from "awilix"
|
||||
import Redis from "ioredis"
|
||||
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 {
|
||||
BeforeCreate,
|
||||
|
||||
@@ -5,25 +5,24 @@ import {
|
||||
TransactionHandlerType,
|
||||
TransactionStep,
|
||||
WorkflowScheduler,
|
||||
} from "@medusajs/orchestration"
|
||||
} from "@medusajs/framework/orchestration"
|
||||
import {
|
||||
ContainerLike,
|
||||
Context,
|
||||
Logger,
|
||||
MedusaContainer,
|
||||
} from "@medusajs/types"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
InjectSharedContext,
|
||||
isString,
|
||||
MedusaContext,
|
||||
TransactionState,
|
||||
isString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
FlowRunOptions,
|
||||
MedusaWorkflow,
|
||||
ReturnWorkflow,
|
||||
resolveValue,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
ReturnWorkflow,
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import Redis from "ioredis"
|
||||
import { ulid } from "ulid"
|
||||
import type { RedisDistributedTransactionStorage } from "../utils"
|
||||
@@ -107,7 +106,6 @@ export class WorkflowOrchestratorService {
|
||||
workflowOrchestratorService: WorkflowOrchestratorService
|
||||
redisPublisher: Redis
|
||||
redisSubscriber: Redis
|
||||
logger: Logger
|
||||
sharedContainer: MedusaContainer
|
||||
}) {
|
||||
this.container_ = sharedContainer
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
InternalModuleDeclaration,
|
||||
ModulesSdkTypes,
|
||||
WorkflowsSdkTypes,
|
||||
} from "@medusajs/types"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
InjectSharedContext,
|
||||
MedusaContext,
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
import type {
|
||||
ReturnWorkflow,
|
||||
UnwrapWorkflowInputDataType,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { WorkflowExecution } from "@models"
|
||||
import { WorkflowOrchestratorService } from "@services"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Logger } from "@medusajs/types"
|
||||
import { Logger } from "@medusajs/framework/types"
|
||||
import { RedisOptions } from "ioredis"
|
||||
|
||||
export type InitializeModuleInjectableDependencies = {
|
||||
|
||||
@@ -7,9 +7,13 @@ import {
|
||||
TransactionCheckpoint,
|
||||
TransactionOptions,
|
||||
TransactionStep,
|
||||
} from "@medusajs/orchestration"
|
||||
import { Logger, ModulesSdkTypes } from "@medusajs/types"
|
||||
import { MedusaError, TransactionState, promiseAll } from "@medusajs/utils"
|
||||
} from "@medusajs/framework/orchestration"
|
||||
import { Logger, ModulesSdkTypes } from "@medusajs/framework/types"
|
||||
import {
|
||||
MedusaError,
|
||||
promiseAll,
|
||||
TransactionState,
|
||||
} from "@medusajs/framework/utils"
|
||||
import { WorkflowOrchestratorService } from "@services"
|
||||
import { Queue, Worker } from "bullmq"
|
||||
import Redis from "ioredis"
|
||||
|
||||
Reference in New Issue
Block a user