@openfn/ws-worker 1.23.0 → 1.23.1

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,10 +1,17 @@
1
1
  # ws-worker
2
2
 
3
+ ## 1.23.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Even when sending final_dataclip_id, send finalState because it may be used by other consumers
8
+
3
9
  ## 1.23.0
4
10
 
5
11
  ### Minor Changes
6
12
 
7
13
  - 01a05ff: on send complete, only send final_state for multi-leaf output state. For single-leaf runs, reutrn final_dataclip_id
14
+
8
15
  ## 1.22.3
9
16
 
10
17
  ### Patch Changes
package/dist/index.js CHANGED
@@ -824,12 +824,11 @@ async function onWorkflowComplete(context, event) {
824
824
  const isSingleLeaf = state.leafDataclipIds.length === 1 && !state.withheldDataclips[state.leafDataclipIds[0]];
825
825
  const payload = {
826
826
  timestamp: timeInMicroseconds(event.time),
827
+ final_state: result,
827
828
  ...reason
828
829
  };
829
830
  if (isSingleLeaf) {
830
831
  payload.final_dataclip_id = state.leafDataclipIds[0];
831
- } else {
832
- payload.final_state = result;
833
832
  }
834
833
  try {
835
834
  await sendEvent(context, RUN_COMPLETE, payload);
package/dist/start.js CHANGED
@@ -972,12 +972,11 @@ async function onWorkflowComplete(context, event) {
972
972
  const isSingleLeaf = state.leafDataclipIds.length === 1 && !state.withheldDataclips[state.leafDataclipIds[0]];
973
973
  const payload = {
974
974
  timestamp: timeInMicroseconds(event.time),
975
+ final_state: result,
975
976
  ...reason
976
977
  };
977
978
  if (isSingleLeaf) {
978
979
  payload.final_dataclip_id = state.leafDataclipIds[0];
979
- } else {
980
- payload.final_state = result;
981
980
  }
982
981
  try {
983
982
  await sendEvent(context, RUN_COMPLETE, payload);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/ws-worker",
3
- "version": "1.23.0",
3
+ "version": "1.23.1",
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.19.0",
26
+ "@openfn/lexicon": "^1.4.2",
26
27
  "@openfn/engine-multi": "1.10.7",
27
- "@openfn/runtime": "1.8.6",
28
28
  "@openfn/logger": "1.1.2",
29
- "@openfn/lexicon": "^1.4.2"
29
+ "@openfn/runtime": "1.8.6"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/koa": "^2.15.0",