@hatchet-dev/typescript-sdk 1.29.3 → 1.30.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/legacy/workflow.d.ts +4 -4
- package/legacy/workflow.js +1 -1
- package/package.json +1 -1
- package/protoc/v1/workflows.d.ts +2 -0
- package/protoc/v1/workflows.js +12 -0
- package/v1/client/worker/worker-internal.d.ts +2 -1
- package/v1/client/worker/worker-internal.js +25 -10
- package/v1/examples/concurrency_cancel_queued_except_newest/workflow.d.ts +9 -0
- package/v1/examples/concurrency_cancel_queued_except_newest/workflow.js +47 -0
- package/v1/examples/concurrency_cancel_queued_except_oldest/workflow.d.ts +9 -0
- package/v1/examples/concurrency_cancel_queued_except_oldest/workflow.js +47 -0
- package/v1/examples/e2e-worker.js +94 -90
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/legacy/workflow.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as z from 'zod/v4';
|
|
2
2
|
import { CreateStep } from '../step';
|
|
3
|
-
import { ConcurrencyLimitStrategy as PbConcurrencyLimitStrategy, StickyStrategy as PbStickyStrategy } from '../protoc/workflows';
|
|
3
|
+
import { ConcurrencyLimitStrategy as PbConcurrencyLimitStrategy, StickyStrategy as PbStickyStrategy } from '../protoc/v1/workflows';
|
|
4
4
|
declare const StepsSchema: z.ZodArray<z.ZodObject<{
|
|
5
5
|
name: z.ZodString;
|
|
6
6
|
parents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -12,7 +12,7 @@ declare const StepsSchema: z.ZodArray<z.ZodObject<{
|
|
|
12
12
|
dynamicKey: z.ZodOptional<z.ZodString>;
|
|
13
13
|
units: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
14
14
|
limit: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
15
|
-
duration: z.ZodOptional<z.ZodEnum<typeof import("
|
|
15
|
+
duration: z.ZodOptional<z.ZodEnum<typeof import("..").RateLimitDuration>>;
|
|
16
16
|
}, z.core.$strip>>>;
|
|
17
17
|
worker_labels: z.ZodOptional<z.ZodRecord<z.ZodAny, z.ZodLazy<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
18
18
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
@@ -63,7 +63,7 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
|
|
|
63
63
|
dynamicKey: z.ZodOptional<z.ZodString>;
|
|
64
64
|
units: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
65
65
|
limit: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
66
|
-
duration: z.ZodOptional<z.ZodEnum<typeof import("
|
|
66
|
+
duration: z.ZodOptional<z.ZodEnum<typeof import("..").RateLimitDuration>>;
|
|
67
67
|
}, z.core.$strip>>>;
|
|
68
68
|
worker_labels: z.ZodOptional<z.ZodRecord<z.ZodAny, z.ZodLazy<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
69
69
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
@@ -87,7 +87,7 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
|
|
|
87
87
|
dynamicKey: z.ZodOptional<z.ZodString>;
|
|
88
88
|
units: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
89
89
|
limit: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
90
|
-
duration: z.ZodOptional<z.ZodEnum<typeof import("
|
|
90
|
+
duration: z.ZodOptional<z.ZodEnum<typeof import("..").RateLimitDuration>>;
|
|
91
91
|
}, z.core.$strip>>>;
|
|
92
92
|
worker_labels: z.ZodOptional<z.ZodRecord<z.ZodAny, z.ZodLazy<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
93
93
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
package/legacy/workflow.js
CHANGED
|
@@ -36,7 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.CreateWorkflowSchema = exports.StickyStrategy = exports.HatchetTimeoutSchema = exports.WorkflowConcurrency = exports.ConcurrencyLimitStrategy = void 0;
|
|
37
37
|
const z = __importStar(require("zod/v4"));
|
|
38
38
|
const step_1 = require("../step");
|
|
39
|
-
const workflows_1 = require("../protoc/workflows");
|
|
39
|
+
const workflows_1 = require("../protoc/v1/workflows");
|
|
40
40
|
const CronConfigSchema = z.object({
|
|
41
41
|
cron: z.string(),
|
|
42
42
|
event: z.undefined().optional(),
|
package/package.json
CHANGED
package/protoc/v1/workflows.d.ts
CHANGED
|
@@ -48,6 +48,8 @@ export declare enum ConcurrencyLimitStrategy {
|
|
|
48
48
|
QUEUE_NEWEST = 2,
|
|
49
49
|
GROUP_ROUND_ROBIN = 3,
|
|
50
50
|
CANCEL_NEWEST = 4,
|
|
51
|
+
CANCEL_QUEUED_EXCEPT_NEWEST = 5,
|
|
52
|
+
CANCEL_QUEUED_EXCEPT_OLDEST = 6,
|
|
51
53
|
UNRECOGNIZED = -1
|
|
52
54
|
}
|
|
53
55
|
export declare function concurrencyLimitStrategyFromJSON(object: any): ConcurrencyLimitStrategy;
|
package/protoc/v1/workflows.js
CHANGED
|
@@ -209,6 +209,8 @@ var ConcurrencyLimitStrategy;
|
|
|
209
209
|
ConcurrencyLimitStrategy[ConcurrencyLimitStrategy["QUEUE_NEWEST"] = 2] = "QUEUE_NEWEST";
|
|
210
210
|
ConcurrencyLimitStrategy[ConcurrencyLimitStrategy["GROUP_ROUND_ROBIN"] = 3] = "GROUP_ROUND_ROBIN";
|
|
211
211
|
ConcurrencyLimitStrategy[ConcurrencyLimitStrategy["CANCEL_NEWEST"] = 4] = "CANCEL_NEWEST";
|
|
212
|
+
ConcurrencyLimitStrategy[ConcurrencyLimitStrategy["CANCEL_QUEUED_EXCEPT_NEWEST"] = 5] = "CANCEL_QUEUED_EXCEPT_NEWEST";
|
|
213
|
+
ConcurrencyLimitStrategy[ConcurrencyLimitStrategy["CANCEL_QUEUED_EXCEPT_OLDEST"] = 6] = "CANCEL_QUEUED_EXCEPT_OLDEST";
|
|
212
214
|
ConcurrencyLimitStrategy[ConcurrencyLimitStrategy["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
213
215
|
})(ConcurrencyLimitStrategy || (exports.ConcurrencyLimitStrategy = ConcurrencyLimitStrategy = {}));
|
|
214
216
|
function concurrencyLimitStrategyFromJSON(object) {
|
|
@@ -228,6 +230,12 @@ function concurrencyLimitStrategyFromJSON(object) {
|
|
|
228
230
|
case 4:
|
|
229
231
|
case 'CANCEL_NEWEST':
|
|
230
232
|
return ConcurrencyLimitStrategy.CANCEL_NEWEST;
|
|
233
|
+
case 5:
|
|
234
|
+
case 'CANCEL_QUEUED_EXCEPT_NEWEST':
|
|
235
|
+
return ConcurrencyLimitStrategy.CANCEL_QUEUED_EXCEPT_NEWEST;
|
|
236
|
+
case 6:
|
|
237
|
+
case 'CANCEL_QUEUED_EXCEPT_OLDEST':
|
|
238
|
+
return ConcurrencyLimitStrategy.CANCEL_QUEUED_EXCEPT_OLDEST;
|
|
231
239
|
case -1:
|
|
232
240
|
case 'UNRECOGNIZED':
|
|
233
241
|
default:
|
|
@@ -246,6 +254,10 @@ function concurrencyLimitStrategyToJSON(object) {
|
|
|
246
254
|
return 'GROUP_ROUND_ROBIN';
|
|
247
255
|
case ConcurrencyLimitStrategy.CANCEL_NEWEST:
|
|
248
256
|
return 'CANCEL_NEWEST';
|
|
257
|
+
case ConcurrencyLimitStrategy.CANCEL_QUEUED_EXCEPT_NEWEST:
|
|
258
|
+
return 'CANCEL_QUEUED_EXCEPT_NEWEST';
|
|
259
|
+
case ConcurrencyLimitStrategy.CANCEL_QUEUED_EXCEPT_OLDEST:
|
|
260
|
+
return 'CANCEL_QUEUED_EXCEPT_OLDEST';
|
|
249
261
|
case ConcurrencyLimitStrategy.UNRECOGNIZED:
|
|
250
262
|
default:
|
|
251
263
|
return 'UNRECOGNIZED';
|
|
@@ -5,7 +5,7 @@ import { CreateStepRateLimit } from '../../../protoc/workflows';
|
|
|
5
5
|
import { Logger } from '../../../util/logger';
|
|
6
6
|
import { BaseWorkflowDeclaration, WorkflowDefinition, HatchetClient } from '../..';
|
|
7
7
|
import { TaskBatchConfig } from '../../../protoc/v1/workflows';
|
|
8
|
-
import { CreateWorkflowTaskOpts } from '../../task';
|
|
8
|
+
import { Concurrency, CreateWorkflowTaskOpts } from '../../task';
|
|
9
9
|
import { WorkerLabels } from '../../../clients/dispatcher/dispatcher-client';
|
|
10
10
|
import { Duration } from '../duration';
|
|
11
11
|
import { Context } from './context';
|
|
@@ -113,6 +113,7 @@ export declare function mapSlotRequestsPb(task: {
|
|
|
113
113
|
slotCost?: number;
|
|
114
114
|
}, isDurable: boolean): Record<string, number>;
|
|
115
115
|
export declare function mapRateLimitPb(limits: CreateWorkflowTaskOpts<any, any>['rateLimits']): CreateStepRateLimit[];
|
|
116
|
+
export declare function assertValidConcurrencyArr(concurrency: Concurrency[] | undefined): void;
|
|
116
117
|
export declare function mapBatchConfigPb(batch: CreateWorkflowTaskOpts<any, any>['batch']): TaskBatchConfig | undefined;
|
|
117
118
|
export declare function resolveExecutionTimeout(task: {
|
|
118
119
|
executionTimeout?: Duration;
|
|
@@ -55,6 +55,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
55
55
|
exports.InternalWorker = void 0;
|
|
56
56
|
exports.mapSlotRequestsPb = mapSlotRequestsPb;
|
|
57
57
|
exports.mapRateLimitPb = mapRateLimitPb;
|
|
58
|
+
exports.assertValidConcurrencyArr = assertValidConcurrencyArr;
|
|
58
59
|
exports.mapBatchConfigPb = mapBatchConfigPb;
|
|
59
60
|
exports.resolveExecutionTimeout = resolveExecutionTimeout;
|
|
60
61
|
exports.resolveScheduleTimeout = resolveScheduleTimeout;
|
|
@@ -269,6 +270,8 @@ class InternalWorker {
|
|
|
269
270
|
];
|
|
270
271
|
const concurrencyArr = Array.isArray(concurrency) ? concurrency : [];
|
|
271
272
|
const concurrencySolo = !Array.isArray(concurrency) ? concurrency : undefined;
|
|
273
|
+
assertValidConcurrencyArr(concurrencyArr);
|
|
274
|
+
assertValidConcurrencyArr(concurrencySolo ? [concurrencySolo] : undefined);
|
|
272
275
|
// Convert Zod schema to JSON Schema if provided
|
|
273
276
|
let inputJsonSchema;
|
|
274
277
|
if (workflow.inputValidator) {
|
|
@@ -309,7 +312,7 @@ class InternalWorker {
|
|
|
309
312
|
defaultPriority: workflow.defaultPriority,
|
|
310
313
|
inputJsonSchema,
|
|
311
314
|
tasks: [...workflow._tasks, ...workflow._durableTasks].map((task) => {
|
|
312
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l
|
|
315
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
313
316
|
return ({
|
|
314
317
|
readableId: task.name,
|
|
315
318
|
action: `${workflow.name}:${task.name}`,
|
|
@@ -329,15 +332,20 @@ class InternalWorker {
|
|
|
329
332
|
isDurable: durableTaskSet.has(task),
|
|
330
333
|
slotRequests: mapSlotRequestsPb(task, durableTaskSet.has(task)),
|
|
331
334
|
batch: mapBatchConfigPb(batchOf(task)),
|
|
332
|
-
concurrency:
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
335
|
+
concurrency: (() => {
|
|
336
|
+
var _a;
|
|
337
|
+
const taskConcurrency = task.concurrency
|
|
338
|
+
? Array.isArray(task.concurrency)
|
|
339
|
+
? task.concurrency
|
|
340
|
+
: [task.concurrency]
|
|
341
|
+
: ((_a = workflow.taskDefaults) === null || _a === void 0 ? void 0 : _a.concurrency)
|
|
342
|
+
? Array.isArray(workflow.taskDefaults.concurrency)
|
|
343
|
+
? workflow.taskDefaults.concurrency
|
|
344
|
+
: [workflow.taskDefaults.concurrency]
|
|
345
|
+
: [];
|
|
346
|
+
assertValidConcurrencyArr(taskConcurrency);
|
|
347
|
+
return taskConcurrency;
|
|
348
|
+
})(),
|
|
341
349
|
});
|
|
342
350
|
}),
|
|
343
351
|
concurrency: concurrencySolo,
|
|
@@ -1096,6 +1104,13 @@ function parseBatchPayload(actionPayload) {
|
|
|
1096
1104
|
function batchOf(task) {
|
|
1097
1105
|
return 'batch' in task ? task.batch : undefined;
|
|
1098
1106
|
}
|
|
1107
|
+
function assertValidConcurrencyArr(concurrency) {
|
|
1108
|
+
concurrency === null || concurrency === void 0 ? void 0 : concurrency.forEach((c) => {
|
|
1109
|
+
if (c.maxRuns !== undefined && (!Number.isInteger(c.maxRuns) || c.maxRuns <= 0)) {
|
|
1110
|
+
throw new Error(`concurrency.maxRuns must be a positive integer when provided, got: ${c.maxRuns}`);
|
|
1111
|
+
}
|
|
1112
|
+
});
|
|
1113
|
+
}
|
|
1099
1114
|
function mapBatchConfigPb(batch) {
|
|
1100
1115
|
if (!batch) {
|
|
1101
1116
|
return undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { EmptyTaskOutput } from '../concurrency-types';
|
|
2
|
+
export type WorkflowInput = {
|
|
3
|
+
group: string;
|
|
4
|
+
};
|
|
5
|
+
export type WorkflowOutput = {
|
|
6
|
+
step1: EmptyTaskOutput;
|
|
7
|
+
step2: EmptyTaskOutput;
|
|
8
|
+
};
|
|
9
|
+
export declare const concurrencyCancelQueuedExceptNewestWorkflow: import("../..").WorkflowDeclaration<WorkflowInput, WorkflowOutput, {}>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.concurrencyCancelQueuedExceptNewestWorkflow = void 0;
|
|
16
|
+
const sleep_1 = __importDefault(require("../../../util/sleep"));
|
|
17
|
+
const v1_1 = require("../..");
|
|
18
|
+
const hatchet_client_1 = require("../hatchet-client");
|
|
19
|
+
// > Cancel Queued Except Newest
|
|
20
|
+
exports.concurrencyCancelQueuedExceptNewestWorkflow = hatchet_client_1.hatchet.workflow({
|
|
21
|
+
name: 'concurrencycancelqueuedexceptnewest',
|
|
22
|
+
concurrency: {
|
|
23
|
+
expression: 'input.group',
|
|
24
|
+
maxRuns: 1,
|
|
25
|
+
limitStrategy: v1_1.ConcurrencyLimitStrategy.CANCEL_QUEUED_EXCEPT_NEWEST,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
// !!
|
|
29
|
+
const step1 = exports.concurrencyCancelQueuedExceptNewestWorkflow.task({
|
|
30
|
+
name: 'step1',
|
|
31
|
+
fn: (_, ctx) => __awaiter(void 0, void 0, void 0, function* () {
|
|
32
|
+
for (let i = 0; i < 50; i += 1) {
|
|
33
|
+
yield (0, sleep_1.default)(20, ctx.abortController.signal);
|
|
34
|
+
}
|
|
35
|
+
return {};
|
|
36
|
+
}),
|
|
37
|
+
});
|
|
38
|
+
exports.concurrencyCancelQueuedExceptNewestWorkflow.task({
|
|
39
|
+
name: 'step2',
|
|
40
|
+
parents: [step1],
|
|
41
|
+
fn: (_, ctx) => __awaiter(void 0, void 0, void 0, function* () {
|
|
42
|
+
for (let i = 0; i < 50; i += 1) {
|
|
43
|
+
yield (0, sleep_1.default)(20, ctx.abortController.signal);
|
|
44
|
+
}
|
|
45
|
+
return {};
|
|
46
|
+
}),
|
|
47
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { EmptyTaskOutput } from '../concurrency-types';
|
|
2
|
+
export type WorkflowInput = {
|
|
3
|
+
group: string;
|
|
4
|
+
};
|
|
5
|
+
export type WorkflowOutput = {
|
|
6
|
+
step1: EmptyTaskOutput;
|
|
7
|
+
step2: EmptyTaskOutput;
|
|
8
|
+
};
|
|
9
|
+
export declare const concurrencyCancelQueuedExceptOldestWorkflow: import("../..").WorkflowDeclaration<WorkflowInput, WorkflowOutput, {}>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.concurrencyCancelQueuedExceptOldestWorkflow = void 0;
|
|
16
|
+
const sleep_1 = __importDefault(require("../../../util/sleep"));
|
|
17
|
+
const v1_1 = require("../..");
|
|
18
|
+
const hatchet_client_1 = require("../hatchet-client");
|
|
19
|
+
// > Cancel Queued Except Oldest
|
|
20
|
+
exports.concurrencyCancelQueuedExceptOldestWorkflow = hatchet_client_1.hatchet.workflow({
|
|
21
|
+
name: 'concurrencycancelqueuedexceptoldest',
|
|
22
|
+
concurrency: {
|
|
23
|
+
expression: 'input.group',
|
|
24
|
+
maxRuns: 1,
|
|
25
|
+
limitStrategy: v1_1.ConcurrencyLimitStrategy.CANCEL_QUEUED_EXCEPT_OLDEST,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
// !!
|
|
29
|
+
const step1 = exports.concurrencyCancelQueuedExceptOldestWorkflow.task({
|
|
30
|
+
name: 'step1',
|
|
31
|
+
fn: (_, ctx) => __awaiter(void 0, void 0, void 0, function* () {
|
|
32
|
+
for (let i = 0; i < 50; i += 1) {
|
|
33
|
+
yield (0, sleep_1.default)(20, ctx.abortController.signal);
|
|
34
|
+
}
|
|
35
|
+
return {};
|
|
36
|
+
}),
|
|
37
|
+
});
|
|
38
|
+
exports.concurrencyCancelQueuedExceptOldestWorkflow.task({
|
|
39
|
+
name: 'step2',
|
|
40
|
+
parents: [step1],
|
|
41
|
+
fn: (_, ctx) => __awaiter(void 0, void 0, void 0, function* () {
|
|
42
|
+
for (let i = 0; i < 50; i += 1) {
|
|
43
|
+
yield (0, sleep_1.default)(20, ctx.abortController.signal);
|
|
44
|
+
}
|
|
45
|
+
return {};
|
|
46
|
+
}),
|
|
47
|
+
});
|
|
@@ -22,30 +22,32 @@ const cancellation_workflow_1 = require("./cancellation/cancellation-workflow");
|
|
|
22
22
|
const complex_workflow_1 = require("./conditions/complex-workflow");
|
|
23
23
|
const workflow_3 = require("./concurrency_cancel_in_progress/workflow");
|
|
24
24
|
const workflow_4 = require("./concurrency_cancel_newest/workflow");
|
|
25
|
-
const workflow_5 = require("./
|
|
26
|
-
const workflow_6 = require("./
|
|
27
|
-
const workflow_7 = require("./
|
|
28
|
-
const workflow_8 = require("./
|
|
29
|
-
const workflow_9 = require("./
|
|
30
|
-
const workflow_10 = require("./
|
|
31
|
-
const workflow_11 = require("./
|
|
32
|
-
const workflow_12 = require("./
|
|
33
|
-
const workflow_13 = require("./
|
|
34
|
-
const workflow_14 = require("./
|
|
35
|
-
const workflow_15 = require("./
|
|
36
|
-
const workflow_16 = require("./
|
|
37
|
-
const workflow_17 = require("./
|
|
38
|
-
const workflow_18 = require("./
|
|
25
|
+
const workflow_5 = require("./concurrency_cancel_queued_except_newest/workflow");
|
|
26
|
+
const workflow_6 = require("./concurrency_cancel_queued_except_oldest/workflow");
|
|
27
|
+
const workflow_7 = require("./concurrency_multiple_keys/workflow");
|
|
28
|
+
const workflow_8 = require("./concurrency_workflow_level/workflow");
|
|
29
|
+
const workflow_9 = require("./dag/workflow");
|
|
30
|
+
const workflow_10 = require("./durable/workflow");
|
|
31
|
+
const workflow_11 = require("./durable_event/workflow");
|
|
32
|
+
const workflow_12 = require("./durable_eviction/workflow");
|
|
33
|
+
const workflow_13 = require("./durable_sleep/workflow");
|
|
34
|
+
const workflow_14 = require("./logger/workflow");
|
|
35
|
+
const workflow_15 = require("./non_retryable/workflow");
|
|
36
|
+
const workflow_16 = require("./on_failure/workflow");
|
|
37
|
+
const workflow_17 = require("./idempotency/workflow");
|
|
38
|
+
const workflow_18 = require("./on_event/workflow");
|
|
39
|
+
const workflow_19 = require("./return_exceptions/workflow");
|
|
40
|
+
const workflow_20 = require("./run_details/workflow");
|
|
39
41
|
const e2e_workflows_1 = require("./simple/e2e-workflows");
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
const
|
|
42
|
+
const workflow_21 = require("./batch_assign/workflow");
|
|
43
|
+
const workflow_22 = require("./streaming/workflow");
|
|
44
|
+
const workflow_23 = require("./subscribe_to_stream/workflow");
|
|
45
|
+
const workflow_24 = require("./timeout/workflow");
|
|
46
|
+
const workflow_25 = require("./webhooks/workflow");
|
|
47
|
+
const workflow_26 = require("./child_index/workflow");
|
|
48
|
+
const workflow_27 = require("./support_agent/workflow");
|
|
49
|
+
const workflow_28 = require("./welcome_email/workflow");
|
|
50
|
+
const workflow_29 = require("./pdf_pipeline/workflow");
|
|
49
51
|
const workflows = [
|
|
50
52
|
workflow_1.bulkChild,
|
|
51
53
|
workflow_1.bulkParentWorkflow,
|
|
@@ -56,75 +58,77 @@ const workflows = [
|
|
|
56
58
|
complex_workflow_1.taskConditionWorkflow,
|
|
57
59
|
workflow_3.concurrencyCancelInProgressWorkflow,
|
|
58
60
|
workflow_4.concurrencyCancelNewestWorkflow,
|
|
59
|
-
workflow_5.
|
|
60
|
-
workflow_6.
|
|
61
|
-
workflow_7.
|
|
62
|
-
workflow_8.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
workflow_11.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
workflow_14.
|
|
92
|
-
workflow_15.
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
workflow_17.
|
|
96
|
-
workflow_18.
|
|
61
|
+
workflow_5.concurrencyCancelQueuedExceptNewestWorkflow,
|
|
62
|
+
workflow_6.concurrencyCancelQueuedExceptOldestWorkflow,
|
|
63
|
+
workflow_7.concurrencyMultipleKeysWorkflow,
|
|
64
|
+
workflow_8.concurrencyWorkflowLevelWorkflow,
|
|
65
|
+
workflow_9.dag,
|
|
66
|
+
workflow_10.durableWorkflow,
|
|
67
|
+
workflow_10.waitForSleepTwice,
|
|
68
|
+
workflow_10.spawnChildTask,
|
|
69
|
+
workflow_10.durableWithSpawn,
|
|
70
|
+
workflow_10.durableWithBulkSpawn,
|
|
71
|
+
workflow_10.durableSleepEventSpawn,
|
|
72
|
+
workflow_10.durableWithExplicitSpawn,
|
|
73
|
+
workflow_10.durableNonDeterminism,
|
|
74
|
+
workflow_10.durableReplayReset,
|
|
75
|
+
workflow_10.dagChildWorkflow,
|
|
76
|
+
workflow_10.durableSpawnDag,
|
|
77
|
+
workflow_10.waitForEventLookback,
|
|
78
|
+
workflow_10.waitForOrEventLookback,
|
|
79
|
+
workflow_10.waitForTwoEventsSecondPushedFirst,
|
|
80
|
+
workflow_10.errorRaisingTask,
|
|
81
|
+
workflow_10.errorRaisingDurableParent,
|
|
82
|
+
workflow_11.durableEvent,
|
|
83
|
+
workflow_11.durableEventWithFilter,
|
|
84
|
+
workflow_13.durableSleep,
|
|
85
|
+
workflow_12.evictableSleep,
|
|
86
|
+
workflow_12.evictableWaitForEvent,
|
|
87
|
+
workflow_12.evictableChildSpawn,
|
|
88
|
+
workflow_12.multipleEviction,
|
|
89
|
+
workflow_12.nonEvictableSleep,
|
|
90
|
+
workflow_12.childTask,
|
|
91
|
+
workflow_12.bulkChildTask,
|
|
92
|
+
workflow_12.evictableChildBulkSpawn,
|
|
93
|
+
(0, workflow_14.createLoggingWorkflow)(hatchet_client_1.hatchet),
|
|
94
|
+
workflow_15.nonRetryableWorkflow,
|
|
95
|
+
workflow_16.failureWorkflow,
|
|
96
|
+
workflow_17.idempotentTask,
|
|
97
|
+
workflow_17.idempotentTaskShortWindow,
|
|
98
|
+
workflow_18.lower,
|
|
99
|
+
workflow_19.returnExceptionsTask,
|
|
100
|
+
workflow_20.runDetailTestWorkflow,
|
|
97
101
|
e2e_workflows_1.helloWorld,
|
|
98
102
|
e2e_workflows_1.helloWorldDurable,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
103
|
+
workflow_22.streamingTask,
|
|
104
|
+
workflow_23.dagStream,
|
|
105
|
+
workflow_23.longStream,
|
|
106
|
+
workflow_24.timeoutTask,
|
|
107
|
+
workflow_24.refreshTimeoutTask,
|
|
108
|
+
workflow_25.webhookWorkflow,
|
|
109
|
+
workflow_26.childIndexChild,
|
|
110
|
+
workflow_26.childIndexParent,
|
|
111
|
+
workflow_26.scenarioTask,
|
|
112
|
+
workflow_26.orchestratorTask,
|
|
113
|
+
workflow_27.supportAgent,
|
|
114
|
+
workflow_27.triageTicket,
|
|
115
|
+
workflow_27.generateReply,
|
|
116
|
+
workflow_27.escalateTicket,
|
|
117
|
+
workflow_28.welcomeEmail,
|
|
118
|
+
workflow_29.pdfPipeline,
|
|
119
|
+
workflow_21.batchSimple,
|
|
120
|
+
workflow_21.batchKeyed,
|
|
121
|
+
workflow_21.batchKeyedFailable,
|
|
122
|
+
workflow_21.batchKeyedInterval,
|
|
123
|
+
workflow_21.batchLarge,
|
|
124
|
+
workflow_21.batchSingle,
|
|
125
|
+
workflow_21.batchOrdered,
|
|
126
|
+
workflow_21.batchBroadcast,
|
|
127
|
+
workflow_21.batchCancel,
|
|
128
|
+
workflow_21.child,
|
|
129
|
+
workflow_21.childBatch,
|
|
130
|
+
workflow_21.batchChildSpawn,
|
|
131
|
+
workflow_21.batchChildBatchSpawn,
|
|
128
132
|
];
|
|
129
133
|
function main() {
|
|
130
134
|
return __awaiter(this, void 0, void 0, function* () {
|
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const HATCHET_VERSION = "1.
|
|
1
|
+
export declare const HATCHET_VERSION = "1.30.0";
|
package/version.js
CHANGED