@temporalio/workflow
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -36,5 +36,7 @@ "use strict"; | ||
return (err.name === 'CancelledFailure' || | ||
((err.name === 'ActivityFailure' || err.name === 'ChildWorkflowFailure') && isCancellation(err.cause))); | ||
((err.name === 'ActivityFailure' || err.name === 'ChildWorkflowFailure') && | ||
looksLikeError(err.cause) && | ||
err.cause.name === 'CancelledFailure')); | ||
} | ||
exports.isCancellation = isCancellation; | ||
//# sourceMappingURL=errors.js.map |
@@ -54,3 +54,7 @@ /** | ||
export declare function tryUnblockConditions(): number; | ||
/** | ||
* Predicate used to prevent triggering conditions for non-query and non-patch jobs. | ||
*/ | ||
export declare function showUnblockConditions(job: coresdk.workflow_activation.IWorkflowActivationJob): boolean; | ||
export declare function dispose(): Promise<void>; | ||
export declare function errorToFailure(err: unknown): ProtoFailure; |
@@ -26,3 +26,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.errorToFailure = exports.dispose = exports.tryUnblockConditions = exports.getAndResetSinkCalls = exports.concludeActivation = exports.activate = exports.initRuntime = exports.overrideGlobals = exports.setImportFuncs = void 0; | ||
exports.errorToFailure = exports.dispose = exports.showUnblockConditions = exports.tryUnblockConditions = exports.getAndResetSinkCalls = exports.concludeActivation = exports.activate = exports.initRuntime = exports.overrideGlobals = exports.setImportFuncs = void 0; | ||
/** | ||
@@ -198,3 +198,5 @@ * Exported functions for the Worker to interact with the Workflow isolate | ||
internals_1.state.activator[job.variant](variant /* TS can't infer this type */); | ||
tryUnblockConditions(); | ||
if (showUnblockConditions(job)) { | ||
tryUnblockConditions(); | ||
} | ||
} | ||
@@ -253,2 +255,9 @@ }); | ||
exports.tryUnblockConditions = tryUnblockConditions; | ||
/** | ||
* Predicate used to prevent triggering conditions for non-query and non-patch jobs. | ||
*/ | ||
function showUnblockConditions(job) { | ||
return !job.queryWorkflow && !job.notifyHasPatch; | ||
} | ||
exports.showUnblockConditions = showUnblockConditions; | ||
async function dispose() { | ||
@@ -255,0 +264,0 @@ const dispose = (0, internal_workflow_common_1.composeInterceptors)(internals_1.state.interceptors.internals, 'dispose', async () => { |
{ | ||
"name": "@temporalio/workflow", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Temporal.io SDK Workflow sub-package", | ||
@@ -34,3 +34,3 @@ "keywords": [ | ||
], | ||
"gitHead": "132f23a47a93fecf3f39836b31f08ea837b30320" | ||
"gitHead": "9790992f0a7da1638cd3db99518e414107651630" | ||
} |
@@ -28,4 +28,6 @@ export { WorkflowExecutionAlreadyStartedError } from '@temporalio/common'; | ||
err.name === 'CancelledFailure' || | ||
((err.name === 'ActivityFailure' || err.name === 'ChildWorkflowFailure') && isCancellation(err.cause)) | ||
((err.name === 'ActivityFailure' || err.name === 'ChildWorkflowFailure') && | ||
looksLikeError(err.cause) && | ||
err.cause.name === 'CancelledFailure') | ||
); | ||
} |
@@ -225,3 +225,5 @@ /** | ||
state.activator[job.variant](variant as any /* TS can't infer this type */); | ||
tryUnblockConditions(); | ||
if (showUnblockConditions(job)) { | ||
tryUnblockConditions(); | ||
} | ||
} | ||
@@ -280,2 +282,9 @@ }); | ||
/** | ||
* Predicate used to prevent triggering conditions for non-query and non-patch jobs. | ||
*/ | ||
export function showUnblockConditions(job: coresdk.workflow_activation.IWorkflowActivationJob): boolean { | ||
return !job.queryWorkflow && !job.notifyHasPatch; | ||
} | ||
export async function dispose(): Promise<void> { | ||
@@ -282,0 +291,0 @@ const dispose = composeInterceptors(state.interceptors.internals, 'dispose', async () => { |
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
322290
6884