@hatchet-dev/typescript-sdk 1.1.3 → 1.1.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hatchet-dev/typescript-sdk",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "Background task orchestration & visibility for developers",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -44,7 +44,7 @@ class RunsClient {
44
44
  const filter = yield this.prepareFilter(opts.filters || {});
45
45
  return this.api.v1TaskCancel(this.tenantId, {
46
46
  externalIds: opts.ids,
47
- filter,
47
+ filter: !opts.ids ? filter : undefined,
48
48
  });
49
49
  });
50
50
  }
@@ -53,7 +53,7 @@ class RunsClient {
53
53
  const filter = yield this.prepareFilter(opts.filters || {});
54
54
  return this.api.v1TaskReplay(this.tenantId, {
55
55
  externalIds: opts.ids,
56
- filter,
56
+ filter: !opts.ids ? filter : undefined,
57
57
  });
58
58
  });
59
59
  }
@@ -21,15 +21,18 @@ const hatchet_client_1 = require("../hatchet-client");
21
21
  function main() {
22
22
  return __awaiter(this, void 0, void 0, function* () {
23
23
  const run = workflow_1.cancellation.runNoWait({});
24
+ const run1 = workflow_1.cancellation.runNoWait({});
24
25
  yield (0, sleep_1.default)(1000);
25
26
  yield run.cancel();
26
27
  const res = yield run.output;
27
- console.log(res);
28
+ const res1 = yield run1.output;
29
+ console.log('canceled', res);
30
+ console.log('completed', res1);
28
31
  yield (0, sleep_1.default)(1000);
29
32
  yield run.replay();
30
33
  const resReplay = yield run.output;
31
34
  console.log(resReplay);
32
- const run2 = workflow_1.cancellation.runNoWait({}, { additionalMetadata: { test: 'test' } });
35
+ const run2 = workflow_1.cancellation.runNoWait({}, { additionalMetadata: { test: 'abc' } });
33
36
  const run4 = workflow_1.cancellation.runNoWait({}, { additionalMetadata: { test: 'test' } });
34
37
  yield (0, sleep_1.default)(1000);
35
38
  yield hatchet_client_1.hatchet.runs.cancel({
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const HATCHET_VERSION = "1.1.3";
1
+ export declare const HATCHET_VERSION = "1.1.5";
package/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HATCHET_VERSION = void 0;
4
- exports.HATCHET_VERSION = '1.1.3';
4
+ exports.HATCHET_VERSION = '1.1.5';