@hatchet-dev/typescript-sdk 1.24.1 → 1.24.2
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
CHANGED
|
@@ -32,7 +32,7 @@ pnpm add @hatchet-dev/typescript-sdk
|
|
|
32
32
|
|
|
33
33
|
## Quick Start
|
|
34
34
|
|
|
35
|
-
For examples of how to use the Hatchet TypeScript SDK, including worker setup and task execution, please see our [official documentation](https://docs.hatchet.run/
|
|
35
|
+
For examples of how to use the Hatchet TypeScript SDK, including worker setup and task execution, please see our [official documentation](https://docs.hatchet.run/v1).
|
|
36
36
|
|
|
37
37
|
## Features
|
|
38
38
|
|
|
@@ -187,7 +187,9 @@ class DurableListenerClient {
|
|
|
187
187
|
}
|
|
188
188
|
_connect() {
|
|
189
189
|
return __awaiter(this, void 0, void 0, function* () {
|
|
190
|
+
var _a;
|
|
190
191
|
this.logger.info('durable event listener connecting...');
|
|
192
|
+
(_a = this._receiveAbort) === null || _a === void 0 ? void 0 : _a.abort();
|
|
191
193
|
this._requestQueue = [];
|
|
192
194
|
this._receiveAbort = new AbortController();
|
|
193
195
|
this._enqueueRequest({
|
|
@@ -248,12 +250,15 @@ class DurableListenerClient {
|
|
|
248
250
|
}
|
|
249
251
|
_requestIterator() {
|
|
250
252
|
return __asyncGenerator(this, arguments, function* _requestIterator_1() {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
253
|
+
const queue = this._requestQueue;
|
|
254
|
+
const { signal } = this._receiveAbort;
|
|
255
|
+
while (this._running && !signal.aborted) {
|
|
256
|
+
while (queue.length > 0) {
|
|
257
|
+
yield yield __await(queue.shift());
|
|
254
258
|
}
|
|
255
259
|
yield __await(new Promise((resolve) => {
|
|
256
260
|
this._requestNotify = resolve;
|
|
261
|
+
signal.addEventListener('abort', () => resolve(), { once: true });
|
|
257
262
|
}));
|
|
258
263
|
this._requestNotify = undefined;
|
|
259
264
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hatchet-dev/typescript-sdk",
|
|
3
|
-
"version": "1.24.
|
|
3
|
+
"version": "1.24.2",
|
|
4
4
|
"description": "Background task orchestration & visibility for developers",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -15,8 +15,22 @@
|
|
|
15
15
|
"type": "git",
|
|
16
16
|
"url": "https://github.com/hatchet-dev/hatchet.git"
|
|
17
17
|
},
|
|
18
|
-
"keywords": [
|
|
19
|
-
|
|
18
|
+
"keywords": [
|
|
19
|
+
"typescript",
|
|
20
|
+
"hatchet",
|
|
21
|
+
"workflow",
|
|
22
|
+
"orchestration",
|
|
23
|
+
"background-tasks",
|
|
24
|
+
"job-queue",
|
|
25
|
+
"task-scheduling"
|
|
26
|
+
],
|
|
27
|
+
"author": "Hatchet <contact@hatchet.run>",
|
|
28
|
+
"contributors": [
|
|
29
|
+
"Alexander Belanger <alexander@hatchet.run>",
|
|
30
|
+
"Matt Kaye <matt@hatchet.run>",
|
|
31
|
+
"Gabe Ruttner <gabe@hatchet.run>",
|
|
32
|
+
"Mohammed Nafees <nafees@hatchet.run>"
|
|
33
|
+
],
|
|
20
34
|
"license": "MIT",
|
|
21
35
|
"devDependencies": {
|
|
22
36
|
"@aws-sdk/client-s3": "^3.1042.0",
|
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const HATCHET_VERSION = "1.24.
|
|
1
|
+
export declare const HATCHET_VERSION = "1.24.2";
|
package/version.js
CHANGED