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:
Adrien de Peretti
2024-09-24 16:58:04 +02:00
committed by GitHub
parent bb342d46f6
commit 6937d74252
40 changed files with 96 additions and 86 deletions

View File

@@ -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"

View File

@@ -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,

View File

@@ -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"

View File

@@ -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"

View File

@@ -1,4 +1,4 @@
import { Logger } from "@medusajs/types"
import { Logger } from "@medusajs/framework/types"
export type InitializeModuleInjectableDependencies = {
logger?: Logger

View File

@@ -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"