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
@@ -2,7 +2,7 @@ import {
|
||||
createStep,
|
||||
createWorkflow,
|
||||
StepResponse,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
const step_1 = createStep(
|
||||
"step_1",
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
createStep,
|
||||
createWorkflow,
|
||||
StepResponse,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
|
||||
const step_1 = createStep(
|
||||
"step_1",
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
createStep,
|
||||
createWorkflow,
|
||||
parallelize,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { setTimeout } from "timers/promises"
|
||||
|
||||
const step_1_background = createStep(
|
||||
|
||||
@@ -2,8 +2,8 @@ import {
|
||||
createStep,
|
||||
createWorkflow,
|
||||
StepResponse,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
import { when } from "@medusajs/workflows-sdk/composer"
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { when } from "@medusajs/framework/workflows-sdk/composer"
|
||||
|
||||
const step_1 = createStep(
|
||||
"step_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"
|
||||
|
||||
export const workflowEventGroupIdStep1Mock = jest.fn(async (input) => {
|
||||
|
||||
@@ -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,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, schedule?: SchedulerOptions) => {
|
||||
const workflowScheduledStepInvoke = jest.fn((input, { container }) => {
|
||||
|
||||
@@ -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"
|
||||
|
||||
const step_1 = createStep(
|
||||
"step_1",
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
import { WorkflowManager } from "@medusajs/orchestration"
|
||||
import { WorkflowManager } from "@medusajs/framework/orchestration"
|
||||
import {
|
||||
Context,
|
||||
IWorkflowEngineService,
|
||||
RemoteQueryFunction,
|
||||
} from "@medusajs/types"
|
||||
import { Module, Modules, TransactionHandlerType } from "@medusajs/utils"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
Module,
|
||||
Modules,
|
||||
TransactionHandlerType,
|
||||
} from "@medusajs/framework/utils"
|
||||
import { WorkflowsModuleService } from "@services"
|
||||
import { asFunction } from "awilix"
|
||||
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"
|
||||
|
||||
export default defineMikroOrmCliConfig(Modules.WORKFLOW_ENGINE, {
|
||||
|
||||
@@ -48,9 +48,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",
|
||||
"cron-parser": "^4.9.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Module, Modules } from "@medusajs/utils"
|
||||
import { Module, Modules } from "@medusajs/framework/utils"
|
||||
import { WorkflowsModuleService } from "@services"
|
||||
import { loadUtils } from "./loaders"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { TransactionState } from "@medusajs/orchestration"
|
||||
import { DALUtils, generateEntityId } from "@medusajs/utils"
|
||||
import { TransactionState } from "@medusajs/framework/orchestration"
|
||||
import { DALUtils, generateEntityId } from "@medusajs/framework/utils"
|
||||
import {
|
||||
BeforeCreate,
|
||||
Entity,
|
||||
|
||||
@@ -5,21 +5,25 @@ import {
|
||||
TransactionHandlerType,
|
||||
TransactionStep,
|
||||
WorkflowScheduler,
|
||||
} from "@medusajs/orchestration"
|
||||
import { ContainerLike, Context, MedusaContainer } from "@medusajs/types"
|
||||
} from "@medusajs/framework/orchestration"
|
||||
import {
|
||||
ContainerLike,
|
||||
Context,
|
||||
MedusaContainer,
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
InjectSharedContext,
|
||||
isString,
|
||||
MedusaContext,
|
||||
MedusaError,
|
||||
TransactionState,
|
||||
isString,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
MedusaWorkflow,
|
||||
ReturnWorkflow,
|
||||
resolveValue,
|
||||
type FlowRunOptions,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
MedusaWorkflow,
|
||||
resolveValue,
|
||||
ReturnWorkflow,
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { ulid } from "ulid"
|
||||
import { InMemoryDistributedTransactionStorage } from "../utils"
|
||||
|
||||
|
||||
@@ -5,16 +5,16 @@ import {
|
||||
MedusaContainer,
|
||||
ModulesSdkTypes,
|
||||
WorkflowsSdkTypes,
|
||||
} from "@medusajs/types"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
InjectSharedContext,
|
||||
MedusaContext,
|
||||
ModulesSdkUtils,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
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"
|
||||
|
||||
export type InitializeModuleInjectableDependencies = {
|
||||
logger?: Logger
|
||||
|
||||
@@ -6,9 +6,9 @@ import {
|
||||
TransactionCheckpoint,
|
||||
TransactionOptions,
|
||||
TransactionStep,
|
||||
} from "@medusajs/orchestration"
|
||||
import { Logger, ModulesSdkTypes } from "@medusajs/types"
|
||||
import { MedusaError, TransactionState } from "@medusajs/utils"
|
||||
} from "@medusajs/framework/orchestration"
|
||||
import { Logger, ModulesSdkTypes } from "@medusajs/framework/types"
|
||||
import { MedusaError, TransactionState } from "@medusajs/framework/utils"
|
||||
import { WorkflowOrchestratorService } from "@services"
|
||||
import { CronExpression, parseExpression } from "cron-parser"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user