@temporalio/activity 1.0.0-rc.1 → 1.0.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/LICENSE.md +1 -1
- package/lib/index.d.ts +2 -3
- package/lib/index.js +5 -16
- package/lib/index.js.map +1 -1
- package/package.json +5 -5
- package/src/index.ts +3 -2
package/LICENSE.md
CHANGED
|
@@ -2,7 +2,7 @@ Temporal TypeScript SDK
|
|
|
2
2
|
|
|
3
3
|
MIT License
|
|
4
4
|
|
|
5
|
-
Copyright (c) 2021 Temporal Technologies
|
|
5
|
+
Copyright (c) 2021 Temporal Technologies Inc. All Rights Reserved
|
|
6
6
|
|
|
7
7
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
8
|
of this software and associated documentation files (the "Software"), to deal
|
package/lib/index.d.ts
CHANGED
|
@@ -45,10 +45,9 @@
|
|
|
45
45
|
/// <reference types="node" />
|
|
46
46
|
import { AbortSignal } from 'abort-controller';
|
|
47
47
|
import { AsyncLocalStorage } from 'async_hooks';
|
|
48
|
-
export { CancelledFailure } from '@temporalio/common';
|
|
48
|
+
export { CancelledFailure, ApplicationFailure } from '@temporalio/common';
|
|
49
49
|
export { ActivityFunction, ActivityInterface, // eslint-disable-line deprecation/deprecation
|
|
50
|
-
UntypedActivities, } from '@temporalio/internal-workflow-common';
|
|
51
|
-
export * from '@temporalio/internal-workflow-common/lib/errors';
|
|
50
|
+
UntypedActivities, errorMessage, errorCode, } from '@temporalio/internal-workflow-common';
|
|
52
51
|
/**
|
|
53
52
|
* Throw this error from an Activity in order to make the Worker forget about this Activity.
|
|
54
53
|
*
|
package/lib/index.js
CHANGED
|
@@ -43,27 +43,16 @@
|
|
|
43
43
|
*
|
|
44
44
|
* @module
|
|
45
45
|
*/
|
|
46
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
47
|
-
if (k2 === undefined) k2 = k;
|
|
48
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
49
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
50
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
51
|
-
}
|
|
52
|
-
Object.defineProperty(o, k2, desc);
|
|
53
|
-
}) : (function(o, m, k, k2) {
|
|
54
|
-
if (k2 === undefined) k2 = k;
|
|
55
|
-
o[k2] = m[k];
|
|
56
|
-
}));
|
|
57
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
58
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
59
|
-
};
|
|
60
46
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61
|
-
exports.Context = exports.asyncLocalStorage = exports.CompleteAsyncError = exports.CancelledFailure = void 0;
|
|
47
|
+
exports.Context = exports.asyncLocalStorage = exports.CompleteAsyncError = exports.errorCode = exports.errorMessage = exports.ApplicationFailure = exports.CancelledFailure = void 0;
|
|
62
48
|
const internal_workflow_common_1 = require("@temporalio/internal-workflow-common");
|
|
63
49
|
const async_hooks_1 = require("async_hooks");
|
|
64
50
|
var common_1 = require("@temporalio/common");
|
|
65
51
|
Object.defineProperty(exports, "CancelledFailure", { enumerable: true, get: function () { return common_1.CancelledFailure; } });
|
|
66
|
-
|
|
52
|
+
Object.defineProperty(exports, "ApplicationFailure", { enumerable: true, get: function () { return common_1.ApplicationFailure; } });
|
|
53
|
+
var internal_workflow_common_2 = require("@temporalio/internal-workflow-common");
|
|
54
|
+
Object.defineProperty(exports, "errorMessage", { enumerable: true, get: function () { return internal_workflow_common_2.errorMessage; } });
|
|
55
|
+
Object.defineProperty(exports, "errorCode", { enumerable: true, get: function () { return internal_workflow_common_2.errorCode; } });
|
|
67
56
|
/**
|
|
68
57
|
* Throw this error from an Activity in order to make the Worker forget about this Activity.
|
|
69
58
|
*
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;;;AAEH,mFAAkE;AAElE,6CAAgD;AAChD,6CAA0E;AAAjE,0GAAA,gBAAgB,OAAA;AAAE,4GAAA,kBAAkB,OAAA;AAC7C,iFAM8C;AAF5C,wHAAA,YAAY,OAAA;AACZ,qHAAA,SAAS,OAAA;AAGX;;;;;;;;;;;;;;;;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;AA2ElE;;;;;;;;;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;;;;;;;;;;;;OAYG;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,qCAAU,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;AAzFD,0BAyFC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temporalio/activity",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Temporal.io SDK Activity sub-package",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
"worker",
|
|
11
11
|
"activity"
|
|
12
12
|
],
|
|
13
|
-
"author": "
|
|
13
|
+
"author": "Temporal Technologies Inc. <sdk@temporal.io>",
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@temporalio/common": "^1.0.0
|
|
17
|
-
"@temporalio/internal-workflow-common": "^1.0.0
|
|
16
|
+
"@temporalio/common": "^1.0.0",
|
|
17
|
+
"@temporalio/internal-workflow-common": "^1.0.0",
|
|
18
18
|
"abort-controller": "^3.0.0"
|
|
19
19
|
},
|
|
20
20
|
"bugs": {
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"src",
|
|
29
29
|
"lib"
|
|
30
30
|
],
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "c4fc4dc608bf58701c11b6ae02d1d63b4457718d"
|
|
32
32
|
}
|
package/src/index.ts
CHANGED
|
@@ -46,13 +46,14 @@
|
|
|
46
46
|
import { msToNumber } from '@temporalio/internal-workflow-common';
|
|
47
47
|
import { AbortSignal } from 'abort-controller';
|
|
48
48
|
import { AsyncLocalStorage } from 'async_hooks';
|
|
49
|
-
export { CancelledFailure } from '@temporalio/common';
|
|
49
|
+
export { CancelledFailure, ApplicationFailure } from '@temporalio/common';
|
|
50
50
|
export {
|
|
51
51
|
ActivityFunction,
|
|
52
52
|
ActivityInterface, // eslint-disable-line deprecation/deprecation
|
|
53
53
|
UntypedActivities,
|
|
54
|
+
errorMessage,
|
|
55
|
+
errorCode,
|
|
54
56
|
} from '@temporalio/internal-workflow-common';
|
|
55
|
-
export * from '@temporalio/internal-workflow-common/lib/errors';
|
|
56
57
|
|
|
57
58
|
/**
|
|
58
59
|
* Throw this error from an Activity in order to make the Worker forget about this Activity.
|