@openfn/ws-worker 1.21.3 → 1.21.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/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # ws-worker
2
2
 
3
+ ## 1.21.5
4
+
5
+ ### Patch Changes
6
+
7
+ - b6c1456: Update the batch logs API.
8
+
9
+ Previously if running with `--batch-logs` enabled, the Worker would restructure the `run:log` event to send a { logs: [] } array on the payload. This functionality was never released to lightning so should be unused.
10
+
11
+ Batch logs are now configured to send a separate `run:batch_logs` event, preserving the `run:log` payload.
12
+
13
+ Batch logs will remain disabled by default until the next major release.
14
+
15
+ ## 1.21.4
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [dd88099]
20
+ - @openfn/runtime@1.8.4
21
+ - @openfn/engine-multi@1.10.4
22
+
3
23
  ## 1.21.3
4
24
 
5
25
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -124,6 +124,7 @@ declare const GET_CREDENTIAL = "fetch:credential";
124
124
  declare const RUN_START = "run:start";
125
125
  declare const RUN_COMPLETE = "run:complete";
126
126
  declare const RUN_LOG = "run:log";
127
+ declare const RUN_LOG_BATCH = "run:batch_logs";
127
128
  declare const STEP_START = "step:start";
128
129
  declare const STEP_COMPLETE = "step:complete";
129
130
  declare const INTERNAL_RUN_COMPLETE = "server:run-complete";
@@ -157,4 +158,4 @@ type RunReplies = {
157
158
  [STEP_COMPLETE]: l.StepCompleteReply;
158
159
  };
159
160
 
160
- export { CLAIM, GET_CREDENTIAL, GET_DATACLIP, GET_PLAN, INTERNAL_CLAIM_COMPLETE, INTERNAL_CLAIM_START, INTERNAL_RUN_COMPLETE, INTERNAL_SOCKET_READY, QueueEventReplies, QueueEvents, RUN_COMPLETE, RUN_LOG, RUN_START, RunEvents, RunReplies, STEP_COMPLETE, STEP_START, WORK_AVAILABLE, createServer as default };
161
+ export { CLAIM, GET_CREDENTIAL, GET_DATACLIP, GET_PLAN, INTERNAL_CLAIM_COMPLETE, INTERNAL_CLAIM_START, INTERNAL_RUN_COMPLETE, INTERNAL_SOCKET_READY, QueueEventReplies, QueueEvents, RUN_COMPLETE, RUN_LOG, RUN_LOG_BATCH, RUN_START, RunEvents, RunReplies, STEP_COMPLETE, STEP_START, WORK_AVAILABLE, createServer as default };
package/dist/index.js CHANGED
@@ -19,6 +19,7 @@ var GET_CREDENTIAL = "fetch:credential";
19
19
  var RUN_START = "run:start";
20
20
  var RUN_COMPLETE = "run:complete";
21
21
  var RUN_LOG = "run:log";
22
+ var RUN_LOG_BATCH = "run:batch_logs";
22
23
  var STEP_START = "step:start";
23
24
  var STEP_COMPLETE = "step:complete";
24
25
  var INTERNAL_RUN_COMPLETE = "server:run-complete";
@@ -612,7 +613,7 @@ async function onRunLog(context, events) {
612
613
  run_id: `${state.plan.id}`,
613
614
  logs
614
615
  };
615
- return sendEvent(context, RUN_LOG, payload);
616
+ return sendEvent(context, RUN_LOG_BATCH, payload);
616
617
  } else {
617
618
  return new Promise(async (resolve) => {
618
619
  for (const log of logs) {
@@ -1567,6 +1568,7 @@ export {
1567
1568
  INTERNAL_SOCKET_READY,
1568
1569
  RUN_COMPLETE,
1569
1570
  RUN_LOG,
1571
+ RUN_LOG_BATCH,
1570
1572
  RUN_START,
1571
1573
  STEP_COMPLETE,
1572
1574
  STEP_START,
package/dist/start.js CHANGED
@@ -168,6 +168,7 @@ var GET_CREDENTIAL = "fetch:credential";
168
168
  var RUN_START = "run:start";
169
169
  var RUN_COMPLETE = "run:complete";
170
170
  var RUN_LOG = "run:log";
171
+ var RUN_LOG_BATCH = "run:batch_logs";
171
172
  var STEP_START = "step:start";
172
173
  var STEP_COMPLETE = "step:complete";
173
174
  var INTERNAL_RUN_COMPLETE = "server:run-complete";
@@ -761,7 +762,7 @@ async function onRunLog(context, events) {
761
762
  run_id: `${state.plan.id}`,
762
763
  logs
763
764
  };
764
- return sendEvent(context, RUN_LOG, payload);
765
+ return sendEvent(context, RUN_LOG_BATCH, payload);
765
766
  } else {
766
767
  return new Promise(async (resolve5) => {
767
768
  for (const log of logs) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/ws-worker",
3
- "version": "1.21.3",
3
+ "version": "1.21.5",
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/engine-multi": "1.10.3",
27
- "@openfn/lexicon": "^1.4.0",
26
+ "@openfn/engine-multi": "1.10.4",
27
+ "@openfn/lexicon": "^1.4.1",
28
28
  "@openfn/logger": "1.1.1",
29
- "@openfn/runtime": "1.8.3"
29
+ "@openfn/runtime": "1.8.4"
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.4.4"
46
+ "@openfn/lightning-mock": "2.4.5"
47
47
  },
48
48
  "files": [
49
49
  "dist",