@node-ts/bus-core
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -36,3 +36,3 @@ import { WorkflowState } from '../workflow-state'; | ||
* Creates a new handling context for a single workflow. This is used so | ||
* that the `$workflowId` is attached to outgoing messages in sticky | ||
* that the `workflowId` is attached to outgoing messages in sticky | ||
* attributes. This allows message chains to be automatically mapped | ||
@@ -39,0 +39,0 @@ * back to the workflow if handled. |
@@ -17,3 +17,3 @@ "use strict"; | ||
const workflowLookup = { | ||
lookup: (_, attributes) => attributes.stickyAttributes.$workflowId, | ||
lookup: (_, attributes) => attributes.stickyAttributes.workflowId, | ||
mapsTo: '$workflowId' | ||
@@ -223,3 +223,3 @@ }; | ||
* Creates a new handling context for a single workflow. This is used so | ||
* that the `$workflowId` is attached to outgoing messages in sticky | ||
* that the `workflowId` is attached to outgoing messages in sticky | ||
* attributes. This allows message chains to be automatically mapped | ||
@@ -235,3 +235,3 @@ * back to the workflow if handled. | ||
const workflowHandlingContext = structuredClone(handlingContext); | ||
workflowHandlingContext.attributes.stickyAttributes.$workflowId = | ||
workflowHandlingContext.attributes.stickyAttributes.workflowId = | ||
workflowState.$workflowId; | ||
@@ -238,0 +238,0 @@ message_handling_context_1.messageHandlingContext.set(workflowHandlingContext); |
{ | ||
"name": "@node-ts/bus-core", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "A service bus for message-based, distributed node applications", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -147,3 +147,3 @@ import { MessageAttributes } from '@node-ts/bus-messages' | ||
It.isAny(), | ||
It.is(attributes => !!attributes.stickyAttributes!.$workflowId) | ||
It.is(attributes => !!attributes.stickyAttributes!.workflowId) | ||
), | ||
@@ -150,0 +150,0 @@ Times.once() |
@@ -22,4 +22,4 @@ import { WorkflowState, WorkflowStatus } from '../workflow-state' | ||
_: Message, | ||
attributes: MessageAttributes<{}, { $workflowId: string | undefined }> | ||
) => attributes.stickyAttributes.$workflowId, | ||
attributes: MessageAttributes<{}, { workflowId: string | undefined }> | ||
) => attributes.stickyAttributes.workflowId, | ||
mapsTo: '$workflowId' | ||
@@ -322,3 +322,3 @@ } | ||
* Creates a new handling context for a single workflow. This is used so | ||
* that the `$workflowId` is attached to outgoing messages in sticky | ||
* that the `workflowId` is attached to outgoing messages in sticky | ||
* attributes. This allows message chains to be automatically mapped | ||
@@ -333,3 +333,3 @@ * back to the workflow if handled. | ||
const workflowHandlingContext = structuredClone(handlingContext) | ||
workflowHandlingContext.attributes.stickyAttributes.$workflowId = | ||
workflowHandlingContext.attributes.stickyAttributes.workflowId = | ||
workflowState.$workflowId | ||
@@ -336,0 +336,0 @@ messageHandlingContext.set(workflowHandlingContext) |
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
348656