feat: Workflow engine modules (#6128)
This commit is contained in:
committed by
GitHub
parent
d85fee42ee
commit
302323916b
BIN
packages/modules-sdk/medusajs-modules-sdk-1.12.6.tgz
Normal file
BIN
packages/modules-sdk/medusajs-modules-sdk-1.12.6.tgz
Normal file
Binary file not shown.
@@ -16,6 +16,7 @@ export enum Modules {
|
||||
PRICING = "pricingService",
|
||||
PROMOTION = "promotion",
|
||||
AUTHENTICATION = "authentication",
|
||||
WORKFLOW_ENGINE = "workflows",
|
||||
CART = "cart",
|
||||
CUSTOMER = "customer",
|
||||
PAYMENT = "payment",
|
||||
@@ -30,6 +31,7 @@ export enum ModuleRegistrationName {
|
||||
PRICING = "pricingModuleService",
|
||||
PROMOTION = "promotionModuleService",
|
||||
AUTHENTICATION = "authenticationModuleService",
|
||||
WORKFLOW_ENGINE = "workflowsModuleService",
|
||||
CART = "cartModuleService",
|
||||
CUSTOMER = "customerModuleService",
|
||||
PAYMENT = "paymentModuleService",
|
||||
@@ -45,6 +47,7 @@ export const MODULE_PACKAGE_NAMES = {
|
||||
[Modules.PRICING]: "@medusajs/pricing",
|
||||
[Modules.PROMOTION]: "@medusajs/promotion",
|
||||
[Modules.AUTHENTICATION]: "@medusajs/authentication",
|
||||
[Modules.WORKFLOW_ENGINE]: "@medusajs/workflow-engine-inmemory",
|
||||
[Modules.CART]: "@medusajs/cart",
|
||||
[Modules.CUSTOMER]: "@medusajs/customer",
|
||||
[Modules.PAYMENT]: "@medusajs/payment",
|
||||
@@ -165,6 +168,20 @@ export const ModulesDefinition: { [key: string | Modules]: ModuleDefinition } =
|
||||
resources: MODULE_RESOURCE_TYPE.SHARED,
|
||||
},
|
||||
},
|
||||
[Modules.WORKFLOW_ENGINE]: {
|
||||
key: Modules.WORKFLOW_ENGINE,
|
||||
registrationName: ModuleRegistrationName.WORKFLOW_ENGINE,
|
||||
defaultPackage: false,
|
||||
label: upperCaseFirst(ModuleRegistrationName.WORKFLOW_ENGINE),
|
||||
isRequired: false,
|
||||
canOverride: true,
|
||||
isQueryable: true,
|
||||
dependencies: ["logger"],
|
||||
defaultModuleDeclaration: {
|
||||
scope: MODULE_SCOPE.INTERNAL,
|
||||
resources: MODULE_RESOURCE_TYPE.SHARED,
|
||||
},
|
||||
},
|
||||
[Modules.CART]: {
|
||||
key: Modules.CART,
|
||||
registrationName: ModuleRegistrationName.CART,
|
||||
|
||||
@@ -245,6 +245,12 @@ export async function MedusaApp({
|
||||
registerCustomJoinerConfigs(servicesConfig ?? [])
|
||||
|
||||
if (
|
||||
sharedResourcesConfig?.database?.connection &&
|
||||
!injectedDependencies[ContainerRegistrationKeys.PG_CONNECTION]
|
||||
) {
|
||||
injectedDependencies[ContainerRegistrationKeys.PG_CONNECTION] =
|
||||
sharedResourcesConfig.database.connection
|
||||
} else if (
|
||||
dbData.clientUrl &&
|
||||
!injectedDependencies[ContainerRegistrationKeys.PG_CONNECTION]
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user