@hatchet-dev/typescript-sdk 1.15.2 → 1.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/README.md +14 -2
- package/clients/admin/admin-client.d.ts +2 -2
- package/clients/admin/admin-client.js +8 -9
- package/clients/dispatcher/action-listener.d.ts +3 -6
- package/clients/dispatcher/action-listener.js +54 -23
- package/clients/dispatcher/dispatcher-client.js +5 -8
- package/clients/dispatcher/heartbeat/heartbeat-worker.js +7 -4
- package/clients/event/event-client.d.ts +2 -2
- package/clients/event/event-client.js +5 -11
- package/clients/hatchet-client/hatchet-logger.js +8 -17
- package/clients/listeners/durable-listener/durable-listener-client.d.ts +115 -15
- package/clients/listeners/durable-listener/durable-listener-client.js +769 -19
- package/clients/listeners/durable-listener/pooled-durable-listener-client.js +11 -22
- package/clients/listeners/run-listener/child-listener-client.d.ts +1 -1
- package/clients/listeners/run-listener/child-listener-client.js +34 -30
- package/clients/listeners/run-listener/pooled-child-listener-client.js +9 -19
- package/clients/rest/generated/Api.d.ts +25 -1
- package/clients/rest/generated/Api.js +20 -0
- package/clients/rest/generated/data-contracts.d.ts +60 -1
- package/clients/rest/generated/data-contracts.js +9 -1
- package/legacy/examples/affinity-workers.js +2 -3
- package/legacy/examples/byo-logger.js +0 -2
- package/legacy/examples/concurrency/cancel-in-progress/concurrency-worker.js +4 -2
- package/legacy/examples/concurrency/group-round-robin/concurrency-event.js +0 -1
- package/legacy/examples/concurrency/group-round-robin/concurrency-worker-expression.js +4 -2
- package/legacy/examples/concurrency/group-round-robin/concurrency-worker-key-fn.js +4 -2
- package/legacy/examples/example-event.js +0 -3
- package/legacy/examples/logger.js +0 -1
- package/legacy/examples/sticky-worker-with-check.js +0 -1
- package/legacy/examples/sticky-worker.js +0 -1
- package/legacy/legacy-client.js +2 -2
- package/legacy/legacy-transformer.js +2 -4
- package/legacy/step.d.ts +16 -16
- package/legacy/step.js +8 -17
- package/legacy/workflow.d.ts +81 -81
- package/package.json +20 -29
- package/protoc/dispatcher/dispatcher.d.ts +20 -0
- package/protoc/dispatcher/dispatcher.js +136 -2
- package/protoc/v1/dispatcher.d.ts +168 -0
- package/protoc/v1/dispatcher.js +1920 -1
- package/protoc/v1/shared/trigger.d.ts +89 -0
- package/protoc/v1/shared/trigger.js +493 -0
- package/protoc/v1/workflows.d.ts +34 -34
- package/protoc/v1/workflows.js +252 -200
- package/protoc/workflows/workflows.d.ts +2 -75
- package/protoc/workflows/workflows.js +16 -491
- package/util/abort-error.d.ts +15 -1
- package/util/abort-error.js +30 -5
- package/util/config-loader/config-loader.js +4 -3
- package/util/config-loader/token.js +9 -2
- package/util/errors/eviction-not-supported-error.d.ts +5 -0
- package/util/errors/eviction-not-supported-error.js +18 -0
- package/util/errors/hatchet-error.d.ts +9 -1
- package/util/errors/hatchet-error.js +23 -2
- package/util/errors/non-determinism-error.d.ts +7 -0
- package/util/errors/non-determinism-error.js +21 -0
- package/util/errors/task-run-terminated-error.d.ts +6 -0
- package/util/errors/task-run-terminated-error.js +15 -0
- package/util/grpc-error.d.ts +9 -0
- package/util/grpc-error.js +25 -0
- package/util/hatchet-promise/hatchet-promise.d.ts +6 -1
- package/util/hatchet-promise/hatchet-promise.js +16 -2
- package/util/logger/logger.js +0 -1
- package/util/parse.d.ts +1 -1
- package/util/parse.js +4 -2
- package/util/retrier.js +2 -3
- package/util/sleep.d.ts +3 -2
- package/util/sleep.js +6 -4
- package/util/workflow-run-ref.js +5 -3
- package/v1/client/admin.d.ts +2 -2
- package/v1/client/admin.js +2 -6
- package/v1/client/client.d.ts +7 -11
- package/v1/client/client.interface.d.ts +5 -8
- package/v1/client/client.js +34 -40
- package/v1/client/duration.d.ts +11 -1
- package/v1/client/duration.js +44 -0
- package/v1/client/features/cel.js +1 -1
- package/v1/client/features/crons.js +2 -2
- package/v1/client/features/index.d.ts +5 -0
- package/v1/client/features/index.js +5 -0
- package/v1/client/features/logs.d.ts +37 -0
- package/v1/client/features/logs.js +46 -0
- package/v1/client/features/runs.d.ts +16 -3
- package/v1/client/features/runs.js +38 -4
- package/v1/client/features/schedules.js +4 -4
- package/v1/client/features/webhooks.js +4 -2
- package/v1/client/features/workflows.js +1 -1
- package/v1/client/worker/context.d.ts +101 -6
- package/v1/client/worker/context.js +257 -44
- package/v1/client/worker/deprecated/deprecation.js +8 -4
- package/v1/client/worker/deprecated/index.d.ts +1 -1
- package/v1/client/worker/deprecated/index.js +2 -1
- package/v1/client/worker/deprecated/legacy-worker.d.ts +5 -0
- package/v1/client/worker/deprecated/legacy-worker.js +33 -24
- package/v1/client/worker/deprecated/pre-eviction.d.ts +12 -0
- package/v1/client/worker/deprecated/pre-eviction.js +37 -0
- package/v1/client/worker/engine-version.d.ts +5 -0
- package/v1/client/worker/engine-version.js +14 -0
- package/v1/client/worker/eviction/eviction-cache.d.ts +33 -0
- package/v1/client/worker/eviction/eviction-cache.js +139 -0
- package/v1/client/worker/eviction/eviction-manager.d.ts +42 -0
- package/v1/client/worker/eviction/eviction-manager.js +132 -0
- package/v1/client/worker/eviction/eviction-policy.d.ts +19 -0
- package/v1/client/worker/eviction/eviction-policy.js +8 -0
- package/v1/client/worker/eviction/index.d.ts +3 -0
- package/v1/client/worker/eviction/index.js +11 -0
- package/v1/client/worker/health-server.js +3 -3
- package/v1/client/worker/slot-utils.js +0 -3
- package/v1/client/worker/worker-internal.d.ts +23 -4
- package/v1/client/worker/worker-internal.js +216 -148
- package/v1/client/worker/worker.d.ts +1 -0
- package/v1/client/worker/worker.js +34 -0
- package/v1/conditions/base.js +0 -1
- package/v1/conditions/index.js +2 -4
- package/v1/conditions/sleep-condition.js +2 -1
- package/v1/conditions/transformer.js +2 -1
- package/v1/declaration.d.ts +6 -4
- package/v1/declaration.js +20 -7
- package/v1/examples/__e2e__/harness.d.ts +5 -0
- package/v1/examples/__e2e__/harness.js +17 -3
- package/v1/examples/affinity/affinity-workers.js +0 -1
- package/v1/examples/bulk_operations/workflow.js +0 -1
- package/v1/examples/cancellation/run.js +0 -1
- package/v1/examples/cancellations/run.js +0 -1
- package/v1/examples/child_workflows/run.js +0 -2
- package/v1/examples/child_workflows/workflow.js +0 -1
- package/v1/examples/concurrency-rr/load.js +0 -1
- package/v1/examples/concurrency-rr/run.js +0 -3
- package/v1/examples/concurrency_limit_rr/load.js +0 -1
- package/v1/examples/concurrency_limit_rr/run.js +0 -3
- package/v1/examples/concurrency_workflow_level/workflow.d.ts +1 -1
- package/v1/examples/concurrency_workflow_level/workflow.js +1 -1
- package/v1/examples/conditions/event.js +0 -1
- package/v1/examples/conditions/run.js +0 -1
- package/v1/examples/dag/run.js +0 -1
- package/v1/examples/dag_match_condition/event.js +0 -1
- package/v1/examples/dag_match_condition/run.js +0 -1
- package/v1/examples/deep/run.js +0 -2
- package/v1/examples/durable/workflow.d.ts +57 -0
- package/v1/examples/durable/workflow.js +164 -10
- package/v1/examples/durable-event/event.js +0 -1
- package/v1/examples/durable-event/run.js +0 -2
- package/v1/examples/durable-event/workflow.js +2 -7
- package/v1/examples/durable-sleep/event.js +0 -1
- package/v1/examples/durable-sleep/run.js +0 -2
- package/v1/examples/durable_event/event.js +0 -1
- package/v1/examples/durable_event/run.js +0 -2
- package/v1/examples/durable_event/workflow.d.ts +1 -0
- package/v1/examples/durable_event/workflow.js +4 -9
- package/v1/examples/durable_eviction/capacity-worker.d.ts +1 -0
- package/v1/examples/durable_eviction/capacity-worker.js +31 -0
- package/v1/examples/durable_eviction/worker.d.ts +1 -0
- package/v1/examples/durable_eviction/worker.js +34 -0
- package/v1/examples/durable_eviction/workflow.d.ts +44 -0
- package/v1/examples/durable_eviction/workflow.js +129 -0
- package/v1/examples/durable_sleep/event.js +0 -1
- package/v1/examples/durable_sleep/run.js +0 -2
- package/v1/examples/e2e-worker.js +42 -19
- package/v1/examples/events/event.js +0 -1
- package/v1/examples/high-memory/run.js +0 -1
- package/v1/examples/inferred-typing/run.js +0 -1
- package/v1/examples/landing_page/durable-excution.js +0 -1
- package/v1/examples/landing_page/queues.js +0 -1
- package/v1/examples/legacy/run.js +0 -1
- package/v1/examples/logger/byo-logger.js +0 -2
- package/v1/examples/logger/logger.js +0 -1
- package/v1/examples/logging/byo-logger.js +0 -2
- package/v1/examples/logging/logger.js +0 -1
- package/v1/examples/middleware/recipes.js +3 -1
- package/v1/examples/migration-guides/mergent.js +2 -1
- package/v1/examples/multiple_wf_concurrency/run.js +0 -3
- package/v1/examples/non_retryable/run.js +0 -1
- package/v1/examples/on_event/event.js +0 -1
- package/v1/examples/on_failure/run.js +0 -1
- package/v1/examples/on_failure/workflow.js +0 -1
- package/v1/examples/on_success/run.js +0 -1
- package/v1/examples/on_success/workflow.js +0 -1
- package/v1/examples/priority/run.js +0 -1
- package/v1/examples/priority/workflow.js +0 -1
- package/v1/examples/retries/run.js +0 -1
- package/v1/examples/retries/workflow.js +0 -1
- package/v1/examples/simple/bulk.js +0 -1
- package/v1/examples/simple/cron.js +0 -2
- package/v1/examples/simple/delay.js +0 -1
- package/v1/examples/simple/enqueue.js +0 -2
- package/v1/examples/simple/run.js +0 -1
- package/v1/examples/simple/schedule.js +0 -1
- package/v1/examples/simple/workflow-with-child.js +10 -4
- package/v1/examples/sticky/run.js +0 -1
- package/v1/examples/sticky/workflow.js +0 -1
- package/v1/examples/streaming/nextjs-proxy.js +0 -1
- package/v1/examples/streaming/run.js +0 -1
- package/v1/examples/timeout/run.js +0 -1
- package/v1/examples/timeouts/run.js +0 -1
- package/v1/index.d.ts +5 -0
- package/v1/index.js +10 -0
- package/v1/parent-run-context-vars.d.ts +6 -0
- package/v1/slot-types.js +0 -1
- package/v1/task.d.ts +10 -2
- package/v1/task.js +2 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/README.md
CHANGED
|
@@ -63,9 +63,21 @@ pnpm install
|
|
|
63
63
|
pnpm build
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
3. Run tests:
|
|
66
|
+
3. Run unit tests:
|
|
67
67
|
```bash
|
|
68
|
-
pnpm test
|
|
68
|
+
pnpm test:unit
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
4. Run e2e tests (requires a running Hatchet engine):
|
|
72
|
+
```bash
|
|
73
|
+
# Run all e2e tests
|
|
74
|
+
pnpm test:e2e
|
|
75
|
+
|
|
76
|
+
# Run a specific e2e test file
|
|
77
|
+
pnpm test:e2e durable.e2e.ts
|
|
78
|
+
|
|
79
|
+
# Run a specific test by name
|
|
80
|
+
pnpm test:e2e durable.e2e.ts -t "durable replay reset"
|
|
69
81
|
```
|
|
70
82
|
|
|
71
83
|
## Contributing
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Channel, ClientFactory } from 'nice-grpc';
|
|
2
|
-
import { CreateWorkflowVersionOpts, RateLimitDuration,
|
|
2
|
+
import { CreateWorkflowVersionOpts, RateLimitDuration, WorkflowServiceClient } from '../../protoc/workflows';
|
|
3
3
|
import { ClientConfig } from '../hatchet-client/client-config';
|
|
4
4
|
import { Logger } from '../../util/logger';
|
|
5
5
|
import WorkflowRunRef from '../../util/workflow-run-ref';
|
|
6
6
|
import { AdminServiceClient, CreateWorkflowVersionRequest } from '../../protoc/v1/workflows';
|
|
7
|
-
import { Priority, RunsClient } from '../../v1';
|
|
7
|
+
import { Priority, RunsClient, WorkerLabelComparator } from '../../v1';
|
|
8
8
|
import { Api } from '../rest';
|
|
9
9
|
import { WebhookWorkerCreateRequest, WorkflowRunStatus, WorkflowRunStatusList } from '../rest/generated/data-contracts';
|
|
10
10
|
import { RunListenerClient } from '../listeners/run-listener/child-listener-client';
|
|
@@ -25,7 +25,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.AdminClient = void 0;
|
|
27
27
|
const workflows_1 = require("../../protoc/workflows");
|
|
28
|
-
const hatchet_error_1 =
|
|
28
|
+
const hatchet_error_1 = require("../../util/errors/hatchet-error");
|
|
29
29
|
const retrier_1 = require("../../util/retrier");
|
|
30
30
|
const workflow_run_ref_1 = __importDefault(require("../../util/workflow-run-ref"));
|
|
31
31
|
const workflows_2 = require("../../protoc/v1/workflows");
|
|
@@ -72,7 +72,7 @@ class AdminClient {
|
|
|
72
72
|
return yield (0, retrier_1.retrier)(() => __awaiter(this, void 0, void 0, function* () { return this.client.putWorkflow({ opts: workflow }); }), this.logger);
|
|
73
73
|
}
|
|
74
74
|
catch (e) {
|
|
75
|
-
throw
|
|
75
|
+
throw (0, hatchet_error_1.toHatchetError)(e);
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
}
|
|
@@ -87,7 +87,7 @@ class AdminClient {
|
|
|
87
87
|
return yield (0, retrier_1.retrier)(() => __awaiter(this, void 0, void 0, function* () { return this.v1Client.putWorkflow(workflow); }), this.logger);
|
|
88
88
|
}
|
|
89
89
|
catch (e) {
|
|
90
|
-
throw
|
|
90
|
+
throw (0, hatchet_error_1.toHatchetError)(e);
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
93
|
}
|
|
@@ -114,7 +114,7 @@ class AdminClient {
|
|
|
114
114
|
}), this.logger);
|
|
115
115
|
}
|
|
116
116
|
catch (e) {
|
|
117
|
-
throw
|
|
117
|
+
throw (0, hatchet_error_1.toHatchetError)(e);
|
|
118
118
|
}
|
|
119
119
|
});
|
|
120
120
|
}
|
|
@@ -153,7 +153,7 @@ class AdminClient {
|
|
|
153
153
|
return new workflow_run_ref_1.default(resp, this.listenerClient, this.workflows, options === null || options === void 0 ? void 0 : options.parentId);
|
|
154
154
|
}
|
|
155
155
|
catch (e) {
|
|
156
|
-
throw
|
|
156
|
+
throw (0, hatchet_error_1.toHatchetError)(e);
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
/**
|
|
@@ -186,7 +186,7 @@ class AdminClient {
|
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
188
|
catch (e) {
|
|
189
|
-
throw
|
|
189
|
+
throw (0, hatchet_error_1.toHatchetError)(e);
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
/**
|
|
@@ -301,9 +301,8 @@ class AdminClient {
|
|
|
301
301
|
* @deprecated use hatchet.schedules.create instead
|
|
302
302
|
*/
|
|
303
303
|
scheduleWorkflow(name, options) {
|
|
304
|
-
let computedName = name;
|
|
305
304
|
try {
|
|
306
|
-
computedName = (0, apply_namespace_1.applyNamespace)(name, this.config.namespace);
|
|
305
|
+
const computedName = (0, apply_namespace_1.applyNamespace)(name, this.config.namespace);
|
|
307
306
|
let input;
|
|
308
307
|
if (options === null || options === void 0 ? void 0 : options.input) {
|
|
309
308
|
input = JSON.stringify(options.input);
|
|
@@ -315,7 +314,7 @@ class AdminClient {
|
|
|
315
314
|
});
|
|
316
315
|
}
|
|
317
316
|
catch (e) {
|
|
318
|
-
throw
|
|
317
|
+
throw (0, hatchet_error_1.toHatchetError)(e);
|
|
319
318
|
}
|
|
320
319
|
}
|
|
321
320
|
/**
|
|
@@ -7,14 +7,11 @@ declare enum ListenStrategy {
|
|
|
7
7
|
LISTEN_STRATEGY_V1 = 1,
|
|
8
8
|
LISTEN_STRATEGY_V2 = 2
|
|
9
9
|
}
|
|
10
|
+
export type ActionKey = `${string}/${number}`;
|
|
10
11
|
export type Action = AssignedAction & {
|
|
11
|
-
|
|
12
|
-
stepRunId?: string;
|
|
13
|
-
/** @deprecated use taskId */
|
|
14
|
-
stepId?: string;
|
|
12
|
+
readonly key: ActionKey;
|
|
15
13
|
};
|
|
16
|
-
export
|
|
17
|
-
export declare function createActionKey(action: Action): ActionKey;
|
|
14
|
+
export declare function createAction(assignedAction: AssignedAction): Action;
|
|
18
15
|
export declare class ActionListener {
|
|
19
16
|
config: ClientConfig;
|
|
20
17
|
client: PbDispatcherClient;
|
|
@@ -1,4 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
36
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
37
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -33,34 +66,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
33
66
|
};
|
|
34
67
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
68
|
exports.ActionListener = void 0;
|
|
36
|
-
exports.
|
|
37
|
-
const dispatcher_1 = require("../../protoc/dispatcher");
|
|
69
|
+
exports.createAction = createAction;
|
|
38
70
|
const nice_grpc_1 = require("nice-grpc");
|
|
71
|
+
const grpc_error_1 = require("../../util/grpc-error");
|
|
39
72
|
const abort_controller_x_1 = require("abort-controller-x");
|
|
40
73
|
const sleep_1 = __importDefault(require("../../util/sleep"));
|
|
41
|
-
const hatchet_error_1 =
|
|
74
|
+
const hatchet_error_1 = __importStar(require("../../util/errors/hatchet-error"));
|
|
42
75
|
const heartbeat_controller_1 = require("./heartbeat/heartbeat-controller");
|
|
43
76
|
const DEFAULT_ACTION_LISTENER_RETRY_INTERVAL = 5000; // milliseconds
|
|
44
77
|
const DEFAULT_ACTION_LISTENER_RETRY_COUNT = 20;
|
|
45
|
-
// eslint-disable-next-line no-shadow
|
|
46
78
|
var ListenStrategy;
|
|
47
79
|
(function (ListenStrategy) {
|
|
48
80
|
ListenStrategy[ListenStrategy["LISTEN_STRATEGY_V1"] = 1] = "LISTEN_STRATEGY_V1";
|
|
49
81
|
ListenStrategy[ListenStrategy["LISTEN_STRATEGY_V2"] = 2] = "LISTEN_STRATEGY_V2";
|
|
50
82
|
})(ListenStrategy || (ListenStrategy = {}));
|
|
51
|
-
function
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
const exhaustivenessCheck = action.actionType;
|
|
62
|
-
throw new Error(`Unhandled action type: ${exhaustivenessCheck}`);
|
|
63
|
-
}
|
|
83
|
+
function createAction(assignedAction) {
|
|
84
|
+
const action = assignedAction;
|
|
85
|
+
Object.defineProperty(action, 'key', {
|
|
86
|
+
get() {
|
|
87
|
+
return `${this.taskRunExternalId}/${this.retryCount}`;
|
|
88
|
+
},
|
|
89
|
+
enumerable: true,
|
|
90
|
+
configurable: true,
|
|
91
|
+
});
|
|
92
|
+
return action;
|
|
64
93
|
}
|
|
65
94
|
class ActionListener {
|
|
66
95
|
constructor(client, workerId, retryInterval = DEFAULT_ACTION_LISTENER_RETRY_INTERVAL, retryCount = DEFAULT_ACTION_LISTENER_RETRY_COUNT) {
|
|
@@ -84,8 +113,7 @@ class ActionListener {
|
|
|
84
113
|
_c = listenClient_1_1.value;
|
|
85
114
|
_d = false;
|
|
86
115
|
const assignedAction = _c;
|
|
87
|
-
|
|
88
|
-
yield yield __await(action);
|
|
116
|
+
yield yield __await(createAction(assignedAction));
|
|
89
117
|
}
|
|
90
118
|
}
|
|
91
119
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
@@ -108,11 +136,11 @@ class ActionListener {
|
|
|
108
136
|
throw e;
|
|
109
137
|
}
|
|
110
138
|
if ((yield __await(client.getListenStrategy())) === ListenStrategy.LISTEN_STRATEGY_V2 &&
|
|
111
|
-
e
|
|
139
|
+
(0, grpc_error_1.getGrpcErrorCode)(e) === nice_grpc_1.Status.UNIMPLEMENTED) {
|
|
112
140
|
client.setListenStrategy(ListenStrategy.LISTEN_STRATEGY_V1);
|
|
113
141
|
}
|
|
114
142
|
client.incrementRetries();
|
|
115
|
-
client.logger.error(`Listener encountered an error: ${e
|
|
143
|
+
client.logger.error(`Listener encountered an error: ${(0, hatchet_error_1.getErrorMessage)(e)}`);
|
|
116
144
|
if (client.retries > 1) {
|
|
117
145
|
client.logger.info(`Retrying in ${client.retryInterval}ms...`);
|
|
118
146
|
yield __await((0, sleep_1.default)(client.retryInterval));
|
|
@@ -186,7 +214,7 @@ class ActionListener {
|
|
|
186
214
|
catch (e) {
|
|
187
215
|
this.retries += 1;
|
|
188
216
|
this.logger.error(`Attempt ${this.retries}: Failed to connect, retrying...`);
|
|
189
|
-
if (e
|
|
217
|
+
if ((0, grpc_error_1.getGrpcErrorCode)(e) === nice_grpc_1.Status.UNAVAILABLE) {
|
|
190
218
|
// Connection lost, reset heartbeat interval and retry connection
|
|
191
219
|
this.heartbeat.stop();
|
|
192
220
|
return this.getListenClient();
|
|
@@ -209,7 +237,10 @@ class ActionListener {
|
|
|
209
237
|
});
|
|
210
238
|
}
|
|
211
239
|
catch (e) {
|
|
212
|
-
throw
|
|
240
|
+
throw (0, hatchet_error_1.toHatchetError)(e, {
|
|
241
|
+
defaultMessage: 'Failed to unsubscribe',
|
|
242
|
+
prefix: 'Failed to unsubscribe: ',
|
|
243
|
+
});
|
|
213
244
|
}
|
|
214
245
|
});
|
|
215
246
|
}
|
|
@@ -19,14 +19,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
19
19
|
}
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
|
-
};
|
|
25
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
23
|
exports.DispatcherClient = void 0;
|
|
27
24
|
exports.mapLabels = mapLabels;
|
|
28
25
|
const dispatcher_1 = require("../../protoc/dispatcher");
|
|
29
|
-
const hatchet_error_1 =
|
|
26
|
+
const hatchet_error_1 = require("../../util/errors/hatchet-error");
|
|
30
27
|
const retrier_1 = require("../../util/retrier");
|
|
31
28
|
const version_1 = require("../../version");
|
|
32
29
|
const slot_types_1 = require("../../v1/slot-types");
|
|
@@ -82,7 +79,7 @@ class DispatcherClient {
|
|
|
82
79
|
return yield (0, retrier_1.retrier)(() => __awaiter(this, void 0, void 0, function* () { return this.client.sendStepActionEvent(event); }), this.logger);
|
|
83
80
|
}
|
|
84
81
|
catch (e) {
|
|
85
|
-
throw
|
|
82
|
+
throw (0, hatchet_error_1.toHatchetError)(e);
|
|
86
83
|
}
|
|
87
84
|
});
|
|
88
85
|
}
|
|
@@ -92,7 +89,7 @@ class DispatcherClient {
|
|
|
92
89
|
return yield (0, retrier_1.retrier)(() => __awaiter(this, void 0, void 0, function* () { return this.client.sendGroupKeyActionEvent(in_); }), this.logger);
|
|
93
90
|
}
|
|
94
91
|
catch (e) {
|
|
95
|
-
throw
|
|
92
|
+
throw (0, hatchet_error_1.toHatchetError)(e);
|
|
96
93
|
}
|
|
97
94
|
});
|
|
98
95
|
}
|
|
@@ -112,7 +109,7 @@ class DispatcherClient {
|
|
|
112
109
|
});
|
|
113
110
|
}
|
|
114
111
|
catch (e) {
|
|
115
|
-
throw
|
|
112
|
+
throw (0, hatchet_error_1.toHatchetError)(e);
|
|
116
113
|
}
|
|
117
114
|
});
|
|
118
115
|
}
|
|
@@ -125,7 +122,7 @@ class DispatcherClient {
|
|
|
125
122
|
});
|
|
126
123
|
}
|
|
127
124
|
catch (e) {
|
|
128
|
-
throw
|
|
125
|
+
throw (0, hatchet_error_1.toHatchetError)(e);
|
|
129
126
|
}
|
|
130
127
|
});
|
|
131
128
|
}
|
|
@@ -13,6 +13,8 @@ const worker_threads_1 = require("worker_threads");
|
|
|
13
13
|
const hatchet_client_1 = require("../../hatchet-client");
|
|
14
14
|
const config_loader_1 = require("../../../util/config-loader");
|
|
15
15
|
const nice_grpc_1 = require("nice-grpc");
|
|
16
|
+
const hatchet_error_1 = require("../../../util/errors/hatchet-error");
|
|
17
|
+
const grpc_error_1 = require("../../../util/grpc-error");
|
|
16
18
|
const grpc_helpers_1 = require("../../../util/grpc-helpers");
|
|
17
19
|
const dispatcher_client_1 = require("../dispatcher-client");
|
|
18
20
|
const heartbeat_controller_1 = require("./heartbeat-controller");
|
|
@@ -69,7 +71,7 @@ class HeartbeatWorker {
|
|
|
69
71
|
this.timeLastHeartbeat = now;
|
|
70
72
|
}
|
|
71
73
|
catch (e) {
|
|
72
|
-
if (e
|
|
74
|
+
if ((0, grpc_error_1.getGrpcErrorCode)(e) === nice_grpc_1.Status.UNIMPLEMENTED) {
|
|
73
75
|
// break out of interval
|
|
74
76
|
const message = 'Heartbeat not implemented, closing heartbeat';
|
|
75
77
|
this.logger.debug(message);
|
|
@@ -80,7 +82,7 @@ class HeartbeatWorker {
|
|
|
80
82
|
this.stop();
|
|
81
83
|
return;
|
|
82
84
|
}
|
|
83
|
-
const message = `Failed to send heartbeat: ${e
|
|
85
|
+
const message = `Failed to send heartbeat: ${(0, hatchet_error_1.getErrorMessage)(e)}`;
|
|
84
86
|
this.logger.debug(message);
|
|
85
87
|
postMessage({
|
|
86
88
|
type: 'error',
|
|
@@ -96,13 +98,14 @@ class HeartbeatWorker {
|
|
|
96
98
|
stop() {
|
|
97
99
|
if (this.heartbeatInterval) {
|
|
98
100
|
clearInterval(this.heartbeatInterval);
|
|
99
|
-
this.heartbeatInterval =
|
|
101
|
+
this.heartbeatInterval = undefined;
|
|
100
102
|
}
|
|
101
103
|
}
|
|
102
104
|
}
|
|
103
105
|
const heartbeat = new HeartbeatWorker(worker_threads_1.workerData.config, worker_threads_1.workerData.workerId);
|
|
104
106
|
heartbeat.start();
|
|
105
107
|
worker_threads_1.parentPort === null || worker_threads_1.parentPort === void 0 ? void 0 : worker_threads_1.parentPort.on('message', (msg) => {
|
|
106
|
-
if (msg === heartbeat_controller_1.STOP_HEARTBEAT)
|
|
108
|
+
if (msg === heartbeat_controller_1.STOP_HEARTBEAT) {
|
|
107
109
|
heartbeat.stop();
|
|
110
|
+
}
|
|
108
111
|
});
|
|
@@ -17,7 +17,7 @@ export interface PushEventOptions {
|
|
|
17
17
|
}
|
|
18
18
|
export interface EventWithMetadata<T> {
|
|
19
19
|
payload: T;
|
|
20
|
-
additionalMetadata?: Record<string,
|
|
20
|
+
additionalMetadata?: Record<string, unknown>;
|
|
21
21
|
priority?: number;
|
|
22
22
|
scope?: string;
|
|
23
23
|
}
|
|
@@ -31,7 +31,7 @@ export declare class EventClient {
|
|
|
31
31
|
constructor(config: ClientConfig, channel: Channel, factory: ClientFactory, api: HatchetClient['api']);
|
|
32
32
|
push<T>(type: string, input: T, options?: PushEventOptions): Promise<import("../../protoc/events/events").Event>;
|
|
33
33
|
bulkPush<T>(type: string, inputs: EventWithMetadata<T>[], options?: PushEventOptions): Promise<import("../../protoc/events/events").Events>;
|
|
34
|
-
putLog(taskRunExternalId: string, log: string, level?: LogLevel, taskRetryCount?: number, metadata?: Record<string,
|
|
34
|
+
putLog(taskRunExternalId: string, log: string, level?: LogLevel, taskRetryCount?: number, metadata?: Record<string, unknown>): Promise<void>;
|
|
35
35
|
putStream(taskRunExternalId: string, data: string | Uint8Array, index: number | undefined): Promise<void>;
|
|
36
36
|
list(opts?: Parameters<typeof this.api.v1EventList>[1]): Promise<import("../rest/generated/data-contracts").V1EventList>;
|
|
37
37
|
}
|
|
@@ -8,16 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
12
|
exports.EventClient = exports.LogLevel = void 0;
|
|
16
13
|
const events_1 = require("../../protoc/events/events");
|
|
17
|
-
const hatchet_error_1 =
|
|
14
|
+
const hatchet_error_1 = require("../../util/errors/hatchet-error");
|
|
18
15
|
const retrier_1 = require("../../util/retrier");
|
|
19
16
|
const apply_namespace_1 = require("../../util/apply-namespace");
|
|
20
|
-
// eslint-disable-next-line no-shadow
|
|
21
17
|
var LogLevel;
|
|
22
18
|
(function (LogLevel) {
|
|
23
19
|
LogLevel["INFO"] = "INFO";
|
|
@@ -52,7 +48,7 @@ class EventClient {
|
|
|
52
48
|
return e;
|
|
53
49
|
}
|
|
54
50
|
catch (e) {
|
|
55
|
-
throw
|
|
51
|
+
throw (0, hatchet_error_1.toHatchetError)(e);
|
|
56
52
|
}
|
|
57
53
|
}
|
|
58
54
|
bulkPush(type, inputs, options = {}) {
|
|
@@ -84,7 +80,7 @@ class EventClient {
|
|
|
84
80
|
return res;
|
|
85
81
|
}
|
|
86
82
|
catch (e) {
|
|
87
|
-
throw
|
|
83
|
+
throw (0, hatchet_error_1.toHatchetError)(e);
|
|
88
84
|
}
|
|
89
85
|
}
|
|
90
86
|
putLog(taskRunExternalId, log, level, taskRetryCount, metadata) {
|
|
@@ -105,8 +101,7 @@ class EventClient {
|
|
|
105
101
|
metadata: metadata ? JSON.stringify(metadata) : undefined,
|
|
106
102
|
})
|
|
107
103
|
.catch((e) => {
|
|
108
|
-
|
|
109
|
-
this.logger.warn(`Could not put log: ${e.message}`);
|
|
104
|
+
this.logger.warn(`Could not put log: ${(0, hatchet_error_1.getErrorMessage)(e)}`);
|
|
110
105
|
});
|
|
111
106
|
});
|
|
112
107
|
}
|
|
@@ -131,8 +126,7 @@ class EventClient {
|
|
|
131
126
|
eventIndex: index,
|
|
132
127
|
});
|
|
133
128
|
}), this.logger).catch((e) => {
|
|
134
|
-
|
|
135
|
-
this.logger.warn(`Could not put log: ${e.message}`);
|
|
129
|
+
this.logger.warn(`Could not put log: ${(0, hatchet_error_1.getErrorMessage)(e)}`);
|
|
136
130
|
});
|
|
137
131
|
});
|
|
138
132
|
}
|
|
@@ -10,7 +10,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.HatchetLogger = exports.DEFAULT_LOGGER = void 0;
|
|
13
|
-
/* eslint-disable no-console */
|
|
14
13
|
const logger_1 = require("../../util/logger");
|
|
15
14
|
const DEFAULT_LOGGER = (context, logLevel) => new HatchetLogger(context, logLevel);
|
|
16
15
|
exports.DEFAULT_LOGGER = DEFAULT_LOGGER;
|
|
@@ -20,6 +19,7 @@ class HatchetLogger {
|
|
|
20
19
|
this.context = context;
|
|
21
20
|
}
|
|
22
21
|
log(level, message, color = '37') {
|
|
22
|
+
var _a;
|
|
23
23
|
if (logger_1.LogLevelEnum[level] >= logger_1.LogLevelEnum[this.logLevel]) {
|
|
24
24
|
const time = new Date().toLocaleString('en-US', {
|
|
25
25
|
month: '2-digit',
|
|
@@ -29,22 +29,13 @@ class HatchetLogger {
|
|
|
29
29
|
minute: '2-digit',
|
|
30
30
|
second: '2-digit',
|
|
31
31
|
});
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
if (level === 'INFO') {
|
|
41
|
-
print = console.info;
|
|
42
|
-
}
|
|
43
|
-
if (level === 'DEBUG') {
|
|
44
|
-
print = console.debug;
|
|
45
|
-
}
|
|
46
|
-
// eslint-disable-next-line no-console
|
|
47
|
-
print(`🪓 ${process.pid} | ${time} ${color && `\x1b[${color || ''}m`} [${level}/${this.context}] ${message}\x1b[0m`);
|
|
32
|
+
const logFn = {
|
|
33
|
+
ERROR: console.error,
|
|
34
|
+
WARN: console.warn,
|
|
35
|
+
INFO: console.info,
|
|
36
|
+
DEBUG: console.debug,
|
|
37
|
+
};
|
|
38
|
+
((_a = logFn[level]) !== null && _a !== void 0 ? _a : console.log)(`🪓 ${process.pid} | ${time} ${color && `\x1b[${color || ''}m`} [${level}/${this.context}] ${message}\x1b[0m`);
|
|
48
39
|
}
|
|
49
40
|
}
|
|
50
41
|
debug(message) {
|
|
@@ -1,31 +1,131 @@
|
|
|
1
|
+
import { EventEmitter } from 'events';
|
|
1
2
|
import { Channel, ClientFactory } from 'nice-grpc';
|
|
2
3
|
import { ClientConfig } from '../../hatchet-client/client-config';
|
|
3
4
|
import { Logger } from '../../../util/logger';
|
|
4
|
-
import { V1DispatcherClient } from '../../../protoc/v1/dispatcher';
|
|
5
|
-
import { SleepMatchCondition, UserEventMatchCondition } from '../../../protoc/v1/shared/condition';
|
|
6
|
-
import {
|
|
7
|
-
|
|
5
|
+
import { V1DispatcherClient, DurableEvent, RegisterDurableEventResponse } from '../../../protoc/v1/dispatcher';
|
|
6
|
+
import { DurableEventListenerConditions, SleepMatchCondition, UserEventMatchCondition } from '../../../protoc/v1/shared/condition';
|
|
7
|
+
import { TriggerWorkflowRequest } from '../../../protoc/v1/shared/trigger';
|
|
8
|
+
export interface DurableTaskRunAckEntryResult {
|
|
9
|
+
nodeId: number;
|
|
10
|
+
branchId: number;
|
|
11
|
+
}
|
|
12
|
+
export interface DurableTaskEventRunAck {
|
|
13
|
+
ackType: 'run';
|
|
14
|
+
invocationCount: number;
|
|
15
|
+
durableTaskExternalId: string;
|
|
16
|
+
runEntries: DurableTaskRunAckEntryResult[];
|
|
17
|
+
}
|
|
18
|
+
export interface DurableTaskEventMemoAck {
|
|
19
|
+
ackType: 'memo';
|
|
20
|
+
invocationCount: number;
|
|
21
|
+
durableTaskExternalId: string;
|
|
22
|
+
branchId: number;
|
|
23
|
+
nodeId: number;
|
|
24
|
+
memoAlreadyExisted: boolean;
|
|
25
|
+
memoResultPayload?: Uint8Array;
|
|
26
|
+
}
|
|
27
|
+
export interface DurableTaskEventWaitForAck {
|
|
28
|
+
ackType: 'waitFor';
|
|
29
|
+
invocationCount: number;
|
|
30
|
+
durableTaskExternalId: string;
|
|
31
|
+
branchId: number;
|
|
32
|
+
nodeId: number;
|
|
33
|
+
}
|
|
34
|
+
export type DurableTaskEventAck = DurableTaskEventRunAck | DurableTaskEventMemoAck | DurableTaskEventWaitForAck;
|
|
35
|
+
export interface DurableTaskEventLogEntryResult {
|
|
36
|
+
durableTaskExternalId: string;
|
|
37
|
+
nodeId: number;
|
|
38
|
+
payload: Record<string, unknown> | undefined;
|
|
39
|
+
}
|
|
40
|
+
export interface WaitForEvent {
|
|
41
|
+
kind: 'waitFor';
|
|
42
|
+
waitForConditions: DurableEventListenerConditions;
|
|
43
|
+
}
|
|
44
|
+
export interface RunChildrenEvent {
|
|
45
|
+
kind: 'runChildren';
|
|
46
|
+
triggerOpts: TriggerWorkflowRequest[];
|
|
47
|
+
}
|
|
48
|
+
export interface MemoEvent {
|
|
49
|
+
kind: 'memo';
|
|
50
|
+
memoKey: Uint8Array;
|
|
51
|
+
payload?: Uint8Array;
|
|
52
|
+
}
|
|
53
|
+
export type DurableTaskSendEvent = WaitForEvent | RunChildrenEvent | MemoEvent;
|
|
8
54
|
export declare class DurableListenerClient {
|
|
9
55
|
config: ClientConfig;
|
|
10
56
|
client: V1DispatcherClient;
|
|
11
57
|
logger: Logger;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
58
|
+
private _workerId;
|
|
59
|
+
private _running;
|
|
60
|
+
private _requestQueue;
|
|
61
|
+
private _requestNotify;
|
|
62
|
+
private _pendingEventAcks;
|
|
63
|
+
private _pendingCallbacks;
|
|
64
|
+
private _bufferedCompletions;
|
|
65
|
+
private _pendingEvictionAcks;
|
|
66
|
+
private _receiveAbort;
|
|
67
|
+
private _statusInterval;
|
|
68
|
+
private _startLock;
|
|
69
|
+
onServerEvict: ((durableTaskExternalId: string, invocationCount: number) => void) | undefined;
|
|
70
|
+
constructor(config: ClientConfig, channel: Channel, factory: ClientFactory);
|
|
71
|
+
get workerId(): string | undefined;
|
|
72
|
+
start(workerId: string): Promise<void>;
|
|
73
|
+
private _doStart;
|
|
74
|
+
ensureStarted(workerId: string): Promise<void>;
|
|
75
|
+
stop(): Promise<void>;
|
|
76
|
+
private _connect;
|
|
77
|
+
private _streamLoop;
|
|
78
|
+
private _requestIterator;
|
|
79
|
+
private _enqueueRequest;
|
|
80
|
+
private _startStatusPolling;
|
|
81
|
+
private _pollWorkerStatus;
|
|
82
|
+
private _failPendingAcks;
|
|
83
|
+
private _failAllPending;
|
|
84
|
+
private _handleResponse;
|
|
85
|
+
sendEvent(durableTaskExternalId: string, invocationCount: number, event: RunChildrenEvent): Promise<DurableTaskEventRunAck>;
|
|
86
|
+
sendEvent(durableTaskExternalId: string, invocationCount: number, event: WaitForEvent): Promise<DurableTaskEventWaitForAck>;
|
|
87
|
+
sendEvent(durableTaskExternalId: string, invocationCount: number, event: MemoEvent): Promise<DurableTaskEventMemoAck>;
|
|
88
|
+
waitForCallback(durableTaskExternalId: string, invocationCount: number, branchId: number, nodeId: number, opts?: {
|
|
89
|
+
signal?: AbortSignal;
|
|
90
|
+
}): Promise<DurableTaskEventLogEntryResult>;
|
|
91
|
+
cleanupTaskState(durableTaskExternalId: string, invocationCount: number): void;
|
|
92
|
+
sendEvictInvocation(durableTaskExternalId: string, invocationCount: number, reason?: string): Promise<void>;
|
|
93
|
+
sendMemoCompletedNotification(durableTaskExternalId: string, nodeId: number, branchId: number, invocationCount: number, memoKey: Uint8Array, memoResultPayload?: Uint8Array): Promise<void>;
|
|
94
|
+
/**
|
|
95
|
+
* @deprecated Legacy backward-compat: uses the old unary RegisterDurableEvent RPC.
|
|
96
|
+
*/
|
|
97
|
+
registerDurableEvent(request: {
|
|
98
|
+
taskId: string;
|
|
99
|
+
signalKey: string;
|
|
100
|
+
sleepConditions: Array<SleepMatchCondition>;
|
|
101
|
+
userEventConditions: Array<UserEventMatchCondition>;
|
|
102
|
+
}): Promise<RegisterDurableEventResponse>;
|
|
103
|
+
/**
|
|
104
|
+
* @deprecated Legacy backward-compat: uses the old streaming ListenForDurableEvent RPC.
|
|
105
|
+
*/
|
|
15
106
|
subscribe(request: {
|
|
16
107
|
taskId: string;
|
|
17
108
|
signalKey: string;
|
|
18
|
-
}):
|
|
109
|
+
}): LegacyDurableEventStreamable;
|
|
110
|
+
/**
|
|
111
|
+
* @deprecated Legacy backward-compat: subscribes and waits for a single result.
|
|
112
|
+
*/
|
|
19
113
|
result(request: {
|
|
20
114
|
taskId: string;
|
|
21
115
|
signalKey: string;
|
|
22
116
|
}, opts?: {
|
|
23
117
|
signal?: AbortSignal;
|
|
24
|
-
}): Promise<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
118
|
+
}): Promise<DurableEvent>;
|
|
119
|
+
private _legacyPooledListener;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* @deprecated Legacy support for the old streaming ListenForDurableEvent RPC.
|
|
123
|
+
*/
|
|
124
|
+
export declare class LegacyDurableEventStreamable {
|
|
125
|
+
responseEmitter: EventEmitter<[never]>;
|
|
126
|
+
private _onCleanup;
|
|
127
|
+
constructor(onCleanup: () => void);
|
|
128
|
+
get(opts?: {
|
|
129
|
+
signal?: AbortSignal;
|
|
130
|
+
}): Promise<DurableEvent>;
|
|
31
131
|
}
|