@aikirun/task 0.15.0 → 0.17.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/dist/index.js +6 -3
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// ../../lib/address/index.ts
|
|
2
2
|
function getTaskAddress(name, referenceId) {
|
|
3
|
-
return `${name}
|
|
3
|
+
return `${name}:${referenceId}`;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
// ../../lib/async/delay.ts
|
|
@@ -22,6 +22,9 @@ function delay(ms, options) {
|
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
// ../../lib/crypto/hash.ts
|
|
26
|
+
import { createHash } from "crypto";
|
|
27
|
+
|
|
25
28
|
// ../../lib/json/stable-stringify.ts
|
|
26
29
|
function stableStringify(value) {
|
|
27
30
|
return stringifyValue(value);
|
|
@@ -153,8 +156,8 @@ function getRetryParams(attempts, strategy) {
|
|
|
153
156
|
import { INTERNAL } from "@aikirun/types/symbols";
|
|
154
157
|
import { TaskFailedError } from "@aikirun/types/task";
|
|
155
158
|
import {
|
|
156
|
-
WorkflowRunConflictError,
|
|
157
159
|
WorkflowRunFailedError,
|
|
160
|
+
WorkflowRunRevisionConflictError,
|
|
158
161
|
WorkflowRunSuspendedError
|
|
159
162
|
} from "@aikirun/types/workflow-run";
|
|
160
163
|
function task(params) {
|
|
@@ -249,7 +252,7 @@ var TaskImpl = class {
|
|
|
249
252
|
const output = await this.parse(handle, this.params.schema?.output, outputRaw, logger);
|
|
250
253
|
return { output, lastAttempt: attempts };
|
|
251
254
|
} catch (error) {
|
|
252
|
-
if (error instanceof WorkflowRunFailedError || error instanceof WorkflowRunSuspendedError || error instanceof
|
|
255
|
+
if (error instanceof WorkflowRunFailedError || error instanceof WorkflowRunSuspendedError || error instanceof WorkflowRunRevisionConflictError) {
|
|
253
256
|
throw error;
|
|
254
257
|
}
|
|
255
258
|
const serializableError = createSerializableError(error);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aikirun/task",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "Task SDK for Aiki - define reliable tasks with automatic retries, idempotency, and error handling",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"build": "tsup"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@aikirun/types": "0.
|
|
22
|
-
"@aikirun/workflow": "0.
|
|
21
|
+
"@aikirun/types": "0.17.0",
|
|
22
|
+
"@aikirun/workflow": "0.17.0",
|
|
23
23
|
"@standard-schema/spec": "^1.1.0"
|
|
24
24
|
},
|
|
25
25
|
"publishConfig": {
|