@openfn/ws-worker 1.20.2 → 1.21.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/CHANGELOG.md +16 -0
- package/dist/index.js +2 -16
- package/dist/start.js +2 -16
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# ws-worker
|
|
2
2
|
|
|
3
|
+
## 1.21.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 064933d: Measure the size of state objects at the end of each step, and throw if they exceed a limit
|
|
8
|
+
|
|
9
|
+
In the Worker, this limit is set to 25% of the available runtime memory.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- f089f8d: Remove special edge condition mapping (this is now handled by the runtime)
|
|
14
|
+
- Updated dependencies [f089f8d]
|
|
15
|
+
- Updated dependencies [064933d]
|
|
16
|
+
- @openfn/runtime@1.8.0
|
|
17
|
+
- @openfn/engine-multi@1.10.0
|
|
18
|
+
|
|
3
19
|
## 1.20.2
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -286,19 +286,6 @@ import {
|
|
|
286
286
|
import crypto2 from "node:crypto";
|
|
287
287
|
import path from "node:path";
|
|
288
288
|
import { getNameAndVersion } from "@openfn/runtime";
|
|
289
|
-
var conditions = {
|
|
290
|
-
on_job_success: (upstreamId) => `Boolean(!state?.errors?.["${upstreamId}"] ?? true)`,
|
|
291
|
-
on_job_failure: (upstreamId) => `Boolean(state?.errors && state.errors["${upstreamId}"])`,
|
|
292
|
-
always: (_upstreamId) => null
|
|
293
|
-
};
|
|
294
|
-
var mapEdgeCondition = (edge) => {
|
|
295
|
-
const { condition } = edge;
|
|
296
|
-
if (condition && condition in conditions) {
|
|
297
|
-
const upstream = edge.source_job_id || edge.source_trigger_id;
|
|
298
|
-
return conditions[condition](upstream);
|
|
299
|
-
}
|
|
300
|
-
return condition;
|
|
301
|
-
};
|
|
302
289
|
var mapTriggerEdgeCondition = (edge) => {
|
|
303
290
|
const { condition } = edge;
|
|
304
291
|
if (condition === void 0 || condition === "always")
|
|
@@ -414,9 +401,8 @@ var convert_lightning_plan_default = (run, options = {}) => {
|
|
|
414
401
|
}
|
|
415
402
|
const next = edges.filter((e) => e.source_job_id === id).reduce((obj, edge) => {
|
|
416
403
|
const newEdge = {};
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
newEdge.condition = condition;
|
|
404
|
+
if (edge.condition) {
|
|
405
|
+
newEdge.condition = edge.condition;
|
|
420
406
|
}
|
|
421
407
|
if (edge.enabled === false) {
|
|
422
408
|
newEdge.disabled = true;
|
package/dist/start.js
CHANGED
|
@@ -435,19 +435,6 @@ import {
|
|
|
435
435
|
import crypto3 from "node:crypto";
|
|
436
436
|
import path from "node:path";
|
|
437
437
|
import { getNameAndVersion } from "@openfn/runtime";
|
|
438
|
-
var conditions = {
|
|
439
|
-
on_job_success: (upstreamId) => `Boolean(!state?.errors?.["${upstreamId}"] ?? true)`,
|
|
440
|
-
on_job_failure: (upstreamId) => `Boolean(state?.errors && state.errors["${upstreamId}"])`,
|
|
441
|
-
always: (_upstreamId) => null
|
|
442
|
-
};
|
|
443
|
-
var mapEdgeCondition = (edge) => {
|
|
444
|
-
const { condition } = edge;
|
|
445
|
-
if (condition && condition in conditions) {
|
|
446
|
-
const upstream = edge.source_job_id || edge.source_trigger_id;
|
|
447
|
-
return conditions[condition](upstream);
|
|
448
|
-
}
|
|
449
|
-
return condition;
|
|
450
|
-
};
|
|
451
438
|
var mapTriggerEdgeCondition = (edge) => {
|
|
452
439
|
const { condition } = edge;
|
|
453
440
|
if (condition === void 0 || condition === "always")
|
|
@@ -563,9 +550,8 @@ var convert_lightning_plan_default = (run2, options = {}) => {
|
|
|
563
550
|
}
|
|
564
551
|
const next = edges.filter((e) => e.source_job_id === id).reduce((obj, edge) => {
|
|
565
552
|
const newEdge = {};
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
newEdge.condition = condition;
|
|
553
|
+
if (edge.condition) {
|
|
554
|
+
newEdge.condition = edge.condition;
|
|
569
555
|
}
|
|
570
556
|
if (edge.enabled === false) {
|
|
571
557
|
newEdge.disabled = true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/ws-worker",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.21.0",
|
|
4
4
|
"description": "A Websocket Worker to connect Lightning to a Runtime Engine",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"koa-logger": "^3.2.1",
|
|
24
24
|
"phoenix": "1.7.10",
|
|
25
25
|
"ws": "^8.18.3",
|
|
26
|
-
"@openfn/
|
|
26
|
+
"@openfn/lexicon": "^1.3.0",
|
|
27
27
|
"@openfn/logger": "1.1.1",
|
|
28
|
-
"@openfn/
|
|
29
|
-
"@openfn/
|
|
28
|
+
"@openfn/engine-multi": "1.10.0",
|
|
29
|
+
"@openfn/runtime": "1.8.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/koa": "^2.15.0",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"tsup": "^6.7.0",
|
|
44
44
|
"typescript": "^4.9.5",
|
|
45
45
|
"yargs": "^17.7.2",
|
|
46
|
-
"@openfn/lightning-mock": "2.
|
|
46
|
+
"@openfn/lightning-mock": "2.4.1"
|
|
47
47
|
},
|
|
48
48
|
"files": [
|
|
49
49
|
"dist",
|