@medusajs/orchestration
Advanced tools
Comparing version 0.2.0-next-20230817110618 to 0.2.0-next-20230817122619
@@ -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-next-20230817110618", | ||
"version": "0.2.0-next-20230817122619", | ||
"description": "Medusa utilities to orchestrate modules", | ||
@@ -20,3 +20,3 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"@medusajs/types": "1.10.2-next-20230817110618", | ||
"@medusajs/types": "1.10.2-next-20230817122619", | ||
"cross-env": "^5.2.1", | ||
@@ -29,3 +29,3 @@ "jest": "^25.5.4", | ||
"dependencies": { | ||
"@medusajs/utils": "1.9.6-next-20230817110618", | ||
"@medusajs/utils": "1.9.6-next-20230817122619", | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
163734
+ Added@medusajs/utils@1.9.6-next-20230817122619(transitive)
- Removed@medusajs/utils@1.9.6-next-20230817110618(transitive)