@genroc/eval-node 0.13.0 → 0.14.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/dist/worker.js CHANGED
@@ -62,15 +62,15 @@ async function fetchObject(ref) {
62
62
  /** Put each listed value back where its path says it belongs. Paths are arrays of keys, so this
63
63
  * needs no parser: the whole reason they are not JSON Pointer strings. */
64
64
  async function resolveObjects(job) {
65
- let input = job.input;
65
+ let input = job.external_input;
66
66
  for (const e of job.objects ?? []) {
67
67
  const value = await fetchObject(e.ref);
68
68
  if (e.path.length === 0) {
69
69
  input = value;
70
70
  continue;
71
71
  }
72
- // The path is rooted at the entry and starts with "input", which is the value being rebuilt.
73
- const rest = e.path[0] === "input" ? e.path.slice(1) : e.path;
72
+ // The path is rooted at the entry and starts with "external_input", the value being rebuilt.
73
+ const rest = e.path[0] === "external_input" ? e.path.slice(1) : e.path;
74
74
  if (rest.length === 0) {
75
75
  input = value;
76
76
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genroc/eval-node",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=24"
package/worker.ts CHANGED
@@ -43,8 +43,8 @@ type ObjectEntry = { path: (string | number)[]; ref: string; size: number };
43
43
  type QueueTask = {
44
44
  token: string;
45
45
  process: string;
46
- task_id: string;
47
- input: unknown;
46
+ task: string;
47
+ external_input: unknown;
48
48
  objects?: ObjectEntry[];
49
49
  raises?: Record<string, unknown>;
50
50
  };
@@ -76,15 +76,15 @@ async function fetchObject(ref: string): Promise<unknown> {
76
76
  /** Put each listed value back where its path says it belongs. Paths are arrays of keys, so this
77
77
  * needs no parser: the whole reason they are not JSON Pointer strings. */
78
78
  async function resolveObjects(job: QueueTask): Promise<unknown> {
79
- let input: any = job.input;
79
+ let input: any = job.external_input;
80
80
  for (const e of job.objects ?? []) {
81
81
  const value = await fetchObject(e.ref);
82
82
  if (e.path.length === 0) {
83
83
  input = value;
84
84
  continue;
85
85
  }
86
- // The path is rooted at the entry and starts with "input", which is the value being rebuilt.
87
- const rest = e.path[0] === "input" ? e.path.slice(1) : e.path;
86
+ // The path is rooted at the entry and starts with "external_input", the value being rebuilt.
87
+ const rest = e.path[0] === "external_input" ? e.path.slice(1) : e.path;
88
88
  if (rest.length === 0) {
89
89
  input = value;
90
90
  continue;