@temporalio/workflow 1.14.2 → 1.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cancellation-scope.d.ts +2 -6
- package/lib/cancellation-scope.js +2 -9
- package/lib/cancellation-scope.js.map +1 -1
- package/lib/flags.js +1 -1
- package/lib/flags.js.map +1 -1
- package/lib/global-attributes.d.ts +17 -5
- package/lib/global-attributes.js +9 -17
- package/lib/global-attributes.js.map +1 -1
- package/lib/global-overrides.js +6 -6
- package/lib/global-overrides.js.map +1 -1
- package/lib/index.d.ts +4 -4
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/interceptors.d.ts +16 -1
- package/lib/interfaces.d.ts +73 -30
- package/lib/interfaces.js +54 -14
- package/lib/interfaces.js.map +1 -1
- package/lib/internals.d.ts +3 -1
- package/lib/internals.js +25 -7
- package/lib/internals.js.map +1 -1
- package/lib/metrics.js +4 -0
- package/lib/metrics.js.map +1 -1
- package/lib/nexus.d.ts +51 -0
- package/lib/nexus.js +68 -8
- package/lib/nexus.js.map +1 -1
- package/lib/stack-helpers.js +1 -1
- package/lib/stack-helpers.js.map +1 -1
- package/lib/update-scope.d.ts +0 -4
- package/lib/update-scope.js +0 -7
- package/lib/update-scope.js.map +1 -1
- package/lib/worker-interface.d.ts +2 -1
- package/lib/worker-interface.js +59 -10
- package/lib/worker-interface.js.map +1 -1
- package/lib/workflow.js +11 -11
- package/lib/workflow.js.map +1 -1
- package/package.json +4 -4
- package/src/cancellation-scope.ts +3 -10
- package/src/flags.ts +1 -1
- package/src/global-attributes.ts +34 -16
- package/src/global-overrides.ts +6 -6
- package/src/index.ts +11 -6
- package/src/interceptors.ts +18 -1
- package/src/interfaces.ts +84 -38
- package/src/internals.ts +30 -8
- package/src/metrics.ts +7 -0
- package/src/nexus.ts +84 -8
- package/src/stack-helpers.ts +2 -3
- package/src/update-scope.ts +1 -8
- package/src/worker-interface.ts +60 -13
- package/src/workflow.ts +11 -11
package/src/workflow.ts
CHANGED
|
@@ -202,7 +202,7 @@ function scheduleActivityNextHandler({ options, args, headers, seq, activityType
|
|
|
202
202
|
headers,
|
|
203
203
|
cancellationType: encodeActivityCancellationType(options.cancellationType),
|
|
204
204
|
doNotEagerlyExecute: !(options.allowEagerDispatch ?? true),
|
|
205
|
-
versioningIntent: versioningIntentToProto(options.versioningIntent), // eslint-disable-line
|
|
205
|
+
versioningIntent: versioningIntentToProto(options.versioningIntent), // eslint-disable-line @typescript-eslint/no-deprecated
|
|
206
206
|
priority: options.priority ? compilePriority(options.priority) : undefined,
|
|
207
207
|
},
|
|
208
208
|
userMetadata: userMetadataToPayload(activator.payloadConverter, options.summary, undefined),
|
|
@@ -401,11 +401,11 @@ function startChildWorkflowExecutionNextHandler({
|
|
|
401
401
|
parentClosePolicy: encodeParentClosePolicy(options.parentClosePolicy),
|
|
402
402
|
cronSchedule: options.cronSchedule,
|
|
403
403
|
searchAttributes:
|
|
404
|
-
options.searchAttributes || options.typedSearchAttributes // eslint-disable-line
|
|
405
|
-
? encodeUnifiedSearchAttributes(options.searchAttributes, options.typedSearchAttributes) // eslint-disable-line
|
|
404
|
+
options.searchAttributes || options.typedSearchAttributes // eslint-disable-line @typescript-eslint/no-deprecated
|
|
405
|
+
? encodeUnifiedSearchAttributes(options.searchAttributes, options.typedSearchAttributes) // eslint-disable-line @typescript-eslint/no-deprecated
|
|
406
406
|
: undefined,
|
|
407
407
|
memo: options.memo && mapToPayloads(activator.payloadConverter, options.memo),
|
|
408
|
-
versioningIntent: versioningIntentToProto(options.versioningIntent), // eslint-disable-line
|
|
408
|
+
versioningIntent: versioningIntentToProto(options.versioningIntent), // eslint-disable-line @typescript-eslint/no-deprecated
|
|
409
409
|
priority: options.priority ? compilePriority(options.priority) : undefined,
|
|
410
410
|
},
|
|
411
411
|
userMetadata: userMetadataToPayload(activator.payloadConverter, options?.staticSummary, options?.staticDetails),
|
|
@@ -1018,12 +1018,12 @@ export function makeContinueAsNewFunc<F extends Workflow>(
|
|
|
1018
1018
|
taskQueue: options.taskQueue,
|
|
1019
1019
|
memo: options.memo && mapToPayloads(activator.payloadConverter, options.memo),
|
|
1020
1020
|
searchAttributes:
|
|
1021
|
-
options.searchAttributes || options.typedSearchAttributes // eslint-disable-line
|
|
1022
|
-
? encodeUnifiedSearchAttributes(options.searchAttributes, options.typedSearchAttributes) // eslint-disable-line
|
|
1021
|
+
options.searchAttributes || options.typedSearchAttributes // eslint-disable-line @typescript-eslint/no-deprecated
|
|
1022
|
+
? encodeUnifiedSearchAttributes(options.searchAttributes, options.typedSearchAttributes) // eslint-disable-line @typescript-eslint/no-deprecated
|
|
1023
1023
|
: undefined,
|
|
1024
1024
|
workflowRunTimeout: msOptionalToTs(options.workflowRunTimeout),
|
|
1025
1025
|
workflowTaskTimeout: msOptionalToTs(options.workflowTaskTimeout),
|
|
1026
|
-
versioningIntent: versioningIntentToProto(options.versioningIntent), // eslint-disable-line
|
|
1026
|
+
versioningIntent: versioningIntentToProto(options.versioningIntent), // eslint-disable-line @typescript-eslint/no-deprecated
|
|
1027
1027
|
});
|
|
1028
1028
|
});
|
|
1029
1029
|
return fn({
|
|
@@ -1509,7 +1509,7 @@ export function setDefaultQueryHandler(handler: DefaultQueryHandler | undefined)
|
|
|
1509
1509
|
* If using SearchAttributeUpdatePair[] (preferred), set a value to null to remove the search attribute.
|
|
1510
1510
|
* If using SearchAttributes (deprecated), set a value to undefined or an empty list to remove the search attribute.
|
|
1511
1511
|
*/
|
|
1512
|
-
// eslint-disable-next-line
|
|
1512
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
1513
1513
|
export function upsertSearchAttributes(searchAttributes: SearchAttributes | SearchAttributeUpdatePair[]): void {
|
|
1514
1514
|
const activator = assertInWorkflowContext(
|
|
1515
1515
|
'Workflow.upsertSearchAttributes(...) may only be used from a Workflow Execution.'
|
|
@@ -1529,7 +1529,7 @@ export function upsertSearchAttributes(searchAttributes: SearchAttributes | Sear
|
|
|
1529
1529
|
|
|
1530
1530
|
activator.mutateWorkflowInfo((info: WorkflowInfo): WorkflowInfo => {
|
|
1531
1531
|
// Create a copy of the current state.
|
|
1532
|
-
const newSearchAttributes: SearchAttributes = { ...info.searchAttributes }; // eslint-disable-line
|
|
1532
|
+
const newSearchAttributes: SearchAttributes = { ...info.searchAttributes }; // eslint-disable-line @typescript-eslint/no-deprecated
|
|
1533
1533
|
for (const pair of searchAttributes) {
|
|
1534
1534
|
if (pair.value == null) {
|
|
1535
1535
|
// If the value is null, remove the search attribute.
|
|
@@ -1538,7 +1538,7 @@ export function upsertSearchAttributes(searchAttributes: SearchAttributes | Sear
|
|
|
1538
1538
|
} else {
|
|
1539
1539
|
newSearchAttributes[pair.key.name] = Array.isArray(pair.value)
|
|
1540
1540
|
? pair.value
|
|
1541
|
-
: ([pair.value] as SearchAttributeValue); // eslint-disable-line
|
|
1541
|
+
: ([pair.value] as SearchAttributeValue); // eslint-disable-line @typescript-eslint/no-deprecated
|
|
1542
1542
|
}
|
|
1543
1543
|
}
|
|
1544
1544
|
return {
|
|
@@ -1559,7 +1559,7 @@ export function upsertSearchAttributes(searchAttributes: SearchAttributes | Sear
|
|
|
1559
1559
|
activator.mutateWorkflowInfo((info: WorkflowInfo): WorkflowInfo => {
|
|
1560
1560
|
// Create a new copy of the current state.
|
|
1561
1561
|
let typedSearchAttributes = info.typedSearchAttributes.updateCopy([]);
|
|
1562
|
-
const newSearchAttributes: SearchAttributes = { ...info.searchAttributes }; // eslint-disable-line
|
|
1562
|
+
const newSearchAttributes: SearchAttributes = { ...info.searchAttributes }; // eslint-disable-line @typescript-eslint/no-deprecated
|
|
1563
1563
|
|
|
1564
1564
|
// Upsert legacy search attributes into typedSearchAttributes.
|
|
1565
1565
|
for (const [k, v] of Object.entries(searchAttributes)) {
|