@medusajs/orchestration
Advanced tools
Comparing version 0.2.0-snapshot-20230814191958 to 0.2.0-snapshot-20230816122201
@@ -11,8 +11,2 @@ "use strict"; | ||
class RemoteJoiner { | ||
constructor(serviceConfigs, remoteFetchData) { | ||
this.serviceConfigs = serviceConfigs; | ||
this.remoteFetchData = remoteFetchData; | ||
this.serviceConfigCache = new Map(); | ||
this.serviceConfigs = this.buildReferences(serviceConfigs); | ||
} | ||
static filterFields(data, fields, expands) { | ||
@@ -68,2 +62,8 @@ if (!fields) { | ||
} | ||
constructor(serviceConfigs, remoteFetchData) { | ||
this.serviceConfigs = serviceConfigs; | ||
this.remoteFetchData = remoteFetchData; | ||
this.serviceConfigCache = new Map(); | ||
this.serviceConfigs = this.buildReferences(serviceConfigs); | ||
} | ||
setFetchDataCallback(remoteFetchData) { | ||
@@ -70,0 +70,0 @@ this.remoteFetchData = remoteFetchData; |
@@ -14,3 +14,3 @@ import { TransactionFlow } from "./transaction-orchestrator"; | ||
*/ | ||
export declare type TransactionMetadata = { | ||
export type TransactionMetadata = { | ||
model_id: string; | ||
@@ -17,0 +17,0 @@ reply_to_topic: string; |
@@ -5,2 +5,5 @@ "use strict"; | ||
class OrchestratorBuilder { | ||
get hasChanges() { | ||
return this.hasChanges_; | ||
} | ||
constructor(steps) { | ||
@@ -10,5 +13,2 @@ this.hasChanges_ = false; | ||
} | ||
get hasChanges() { | ||
return this.hasChanges_; | ||
} | ||
load(steps) { | ||
@@ -15,0 +15,0 @@ this.steps = { |
@@ -6,3 +6,3 @@ /// <reference types="node" /> | ||
import { EventEmitter } from "events"; | ||
export declare type TransactionFlow = { | ||
export type TransactionFlow = { | ||
modelId: string; | ||
@@ -9,0 +9,0 @@ definition: TransactionStepsDefinition; |
import { DistributedTransaction, TransactionPayload } from "./distributed-transaction"; | ||
import { TransactionHandlerType, TransactionState, TransactionStepStatus, TransactionStepsDefinition } from "./types"; | ||
export declare type TransactionStepHandler = (actionId: string, handlerType: TransactionHandlerType, payload: TransactionPayload, transaction?: DistributedTransaction) => Promise<unknown>; | ||
export type TransactionStepHandler = (actionId: string, handlerType: TransactionHandlerType, payload: TransactionPayload, transaction?: DistributedTransaction) => Promise<unknown>; | ||
/** | ||
@@ -5,0 +5,0 @@ * @class TransactionStep |
@@ -5,3 +5,3 @@ export declare enum TransactionHandlerType { | ||
} | ||
export declare type TransactionStepsDefinition = { | ||
export type TransactionStepsDefinition = { | ||
action?: string; | ||
@@ -36,3 +36,3 @@ continueOnPermanentFailure?: boolean; | ||
} | ||
export declare type TransactionModel = { | ||
export type TransactionModel = { | ||
id: string; | ||
@@ -39,0 +39,0 @@ flow: TransactionStepsDefinition; |
@@ -5,3 +5,3 @@ import { Context, LoadedModule, MedusaContainer } from "@medusajs/types"; | ||
import { OrchestratorBuilder } from "../transaction/orchestrator-builder"; | ||
declare type StepHandler = { | ||
type StepHandler = { | ||
invoke: WorkflowStepHandler; | ||
@@ -8,0 +8,0 @@ compensate?: WorkflowStepHandler; |
@@ -15,7 +15,7 @@ import { Context, MedusaContainer } from "@medusajs/types"; | ||
} | ||
export declare type WorkflowHandler = Map<string, { | ||
export type WorkflowHandler = Map<string, { | ||
invoke: WorkflowStepHandler; | ||
compensate?: WorkflowStepHandler; | ||
}>; | ||
export declare type WorkflowStepHandler = (args: { | ||
export type WorkflowStepHandler = (args: { | ||
container: MedusaContainer; | ||
@@ -22,0 +22,0 @@ payload: unknown; |
{ | ||
"name": "@medusajs/orchestration", | ||
"version": "0.2.0-snapshot-20230814191958", | ||
"version": "0.2.0-snapshot-20230816122201", | ||
"description": "Medusa utilities to orchestrate modules", | ||
@@ -20,3 +20,3 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"@medusajs/types": "1.10.2-snapshot-20230814191958", | ||
"@medusajs/types": "1.10.2-snapshot-20230816122201", | ||
"cross-env": "^5.2.1", | ||
@@ -29,3 +29,3 @@ "jest": "^25.5.4", | ||
"dependencies": { | ||
"@medusajs/utils": "1.9.6-snapshot-20230814191958", | ||
"@medusajs/utils": "1.9.6-snapshot-20230816122201", | ||
"graphql": "^16.6.0" | ||
@@ -32,0 +32,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
163746
+ Added@medusajs/utils@1.9.6-snapshot-20230816122201(transitive)
- Removed@medusajs/utils@1.9.6-snapshot-20230814191958(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedglob@7.2.3(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedonce@1.4.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedwrappy@1.0.2(transitive)