@temporalio/activity 1.4.4 → 1.5.0
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/index.d.ts +3 -3
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +3 -3
package/lib/index.d.ts
CHANGED
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
* The reason for the Cancellation is available at {@link CancelledFailure.message} or
|
|
45
45
|
* {@link Context#cancellationSignal | Context.cancellationSignal.reason}.
|
|
46
46
|
*
|
|
47
|
-
*
|
|
47
|
+
* Activity implementations should opt-in and subscribe to cancellation using one of the following methods:
|
|
48
48
|
*
|
|
49
|
-
* 1. await on {@link Context.cancelled | `Context.current().cancelled`} or
|
|
49
|
+
* 1. `await` on {@link Context.cancelled | `Context.current().cancelled`} or
|
|
50
50
|
* {@link Context.sleep | `Context.current().sleep()`}, which each throw a {@link CancelledFailure}.
|
|
51
51
|
* 1. Pass the context's {@link https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | `AbortSignal`} at
|
|
52
52
|
* {@link Context.cancellationSignal | `Context.current().cancellationSignal`} to a library that supports it.
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
* @module
|
|
70
70
|
*/
|
|
71
71
|
/// <reference types="node" />
|
|
72
|
-
import { AbortSignal } from 'abort-controller';
|
|
73
72
|
import { AsyncLocalStorage } from 'async_hooks';
|
|
73
|
+
import { AbortSignal } from 'abort-controller';
|
|
74
74
|
export { ActivityFunction, ActivityInterface, // eslint-disable-line deprecation/deprecation
|
|
75
75
|
ApplicationFailure, CancelledFailure, UntypedActivities, } from '@temporalio/common';
|
|
76
76
|
/**
|
package/lib/index.js
CHANGED
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
* The reason for the Cancellation is available at {@link CancelledFailure.message} or
|
|
46
46
|
* {@link Context#cancellationSignal | Context.cancellationSignal.reason}.
|
|
47
47
|
*
|
|
48
|
-
*
|
|
48
|
+
* Activity implementations should opt-in and subscribe to cancellation using one of the following methods:
|
|
49
49
|
*
|
|
50
|
-
* 1. await on {@link Context.cancelled | `Context.current().cancelled`} or
|
|
50
|
+
* 1. `await` on {@link Context.cancelled | `Context.current().cancelled`} or
|
|
51
51
|
* {@link Context.sleep | `Context.current().sleep()`}, which each throw a {@link CancelledFailure}.
|
|
52
52
|
* 1. Pass the context's {@link https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | `AbortSignal`} at
|
|
53
53
|
* {@link Context.cancellationSignal | `Context.current().cancellationSignal`} to a library that supports it.
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;;;AAEH,6CAAgD;AAEhD,sDAAyD;AAEzD,6CAM4B;AAH1B,4GAAA,kBAAkB,OAAA;AAClB,0GAAA,gBAAgB,OAAA;AAIlB;;;;;;;;;;;;;;;;GAgBG;AACH,MAAa,kBAAmB,SAAQ,KAAK;IAG3C;QACE,KAAK,EAAE,CAAC;QAHM,SAAI,GAAW,oBAAoB,CAAC;IAIpD,CAAC;CACF;AAND,gDAMC;AAED,cAAc;AACD,QAAA,iBAAiB,GAAG,IAAI,+BAAiB,EAAW,CAAC;AA8ElE;;;;;;;;;GASG;AACH,MAAa,OAAO;IA8BlB;;;;OAIG;IACH,YACE,IAAU,EACV,SAAyB,EACzB,kBAA+B,EAC/B,SAAkC;QAElC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;QAC7C,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;IAC/B,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACI,SAAS,CAAC,OAAiB;QAChC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,OAAO;QACnB,MAAM,KAAK,GAAG,yBAAiB,CAAC,QAAQ,EAAE,CAAC;QAC3C,IAAI,KAAK,KAAK,SAAS,EAAE;YACvB,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;SACrD;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,EAAmB;QAC9B,IAAI,MAAsB,CAAC;QAC3B,MAAM,KAAK,GAAG,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;YAC1C,MAAM,GAAG,UAAU,CAAC,OAAO,EAAE,IAAA,iBAAU,EAAC,EAAE,CAAC,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;QACH,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IACnF,CAAC;CACF;AA3FD,0BA2FC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temporalio/activity",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Temporal.io SDK Activity sub-package",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"author": "Temporal Technologies Inc. <sdk@temporal.io>",
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@temporalio/common": "~1.
|
|
16
|
+
"@temporalio/common": "~1.5.0",
|
|
17
17
|
"abort-controller": "^3.0.0"
|
|
18
18
|
},
|
|
19
19
|
"bugs": {
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"src",
|
|
28
28
|
"lib"
|
|
29
29
|
],
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "b46426d8b9b342c052d53520b50dbb991b8d5e03"
|
|
31
31
|
}
|
package/src/index.ts
CHANGED
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
* The reason for the Cancellation is available at {@link CancelledFailure.message} or
|
|
45
45
|
* {@link Context#cancellationSignal | Context.cancellationSignal.reason}.
|
|
46
46
|
*
|
|
47
|
-
*
|
|
47
|
+
* Activity implementations should opt-in and subscribe to cancellation using one of the following methods:
|
|
48
48
|
*
|
|
49
|
-
* 1. await on {@link Context.cancelled | `Context.current().cancelled`} or
|
|
49
|
+
* 1. `await` on {@link Context.cancelled | `Context.current().cancelled`} or
|
|
50
50
|
* {@link Context.sleep | `Context.current().sleep()`}, which each throw a {@link CancelledFailure}.
|
|
51
51
|
* 1. Pass the context's {@link https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | `AbortSignal`} at
|
|
52
52
|
* {@link Context.cancellationSignal | `Context.current().cancellationSignal`} to a library that supports it.
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
* @module
|
|
70
70
|
*/
|
|
71
71
|
|
|
72
|
-
import { AbortSignal } from 'abort-controller';
|
|
73
72
|
import { AsyncLocalStorage } from 'async_hooks';
|
|
73
|
+
import { AbortSignal } from 'abort-controller';
|
|
74
74
|
import { msToNumber } from '@temporalio/common/lib/time';
|
|
75
75
|
|
|
76
76
|
export {
|