@fluidgrids/workflows 2026.1027.0 → 2026.1027.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/README.md +26 -5
- package/dist/{assemble-DMOuaxRI.d.ts → assemble-CrpUyd_3.d.ts} +20 -2
- package/dist/{assemble-BJo9TECS.d.cts → assemble-DEf3znGD.d.cts} +20 -2
- package/dist/chunk-3M34AUIY.cjs +27 -0
- package/dist/chunk-5AW745OG.js +25 -0
- package/dist/{chunk-RRQ5HOBF.cjs → chunk-6AIAC2FP.cjs} +4 -4
- package/dist/{chunk-GO34UHSY.js → chunk-6BEW4QD6.js} +3 -3
- package/dist/{chunk-SS4LT2IP.js → chunk-6U446SKY.js} +5 -10
- package/dist/{chunk-AU3YW7FZ.cjs → chunk-7YR7DI7B.cjs} +46 -51
- package/dist/{chunk-27HASETB.cjs → chunk-CSYBNN3V.cjs} +3 -1
- package/dist/{chunk-LRM6JXJA.cjs → chunk-E3APHA6O.cjs} +19 -1
- package/dist/{chunk-BWSLWF2E.js → chunk-EEAIM35V.js} +38 -12
- package/dist/{chunk-X4HKU3MX.js → chunk-IHKXLG6I.js} +3 -1
- package/dist/chunk-MBBKGD7K.js +440 -0
- package/dist/{chunk-LSKSBVL4.cjs → chunk-OSPTJCDI.cjs} +6 -6
- package/dist/{chunk-KUTMY2IO.cjs → chunk-TQF7MYEN.cjs} +101 -75
- package/dist/{chunk-BYJ7QTLY.cjs → chunk-TWOYB4Y7.cjs} +13 -13
- package/dist/{chunk-PL73GJR4.js → chunk-UB2BHU2M.js} +1 -1
- package/dist/{chunk-REV7ZOA4.js → chunk-UJNHTS6D.js} +13 -2
- package/dist/{chunk-IZQNUNSU.cjs → chunk-UWQWD7BP.cjs} +17 -17
- package/dist/{chunk-4DPEGDPW.js → chunk-W32BSO3M.js} +4 -4
- package/dist/{chunk-LMX35GNQ.js → chunk-XBIID5DY.js} +4 -4
- package/dist/chunk-Y7NWR3WH.cjs +450 -0
- package/dist/codegen/index.cjs +7 -7
- package/dist/codegen/index.js +5 -5
- package/dist/index.cjs +30 -30
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/ir/index.cjs +118 -116
- package/dist/ir/index.d.cts +18 -8
- package/dist/ir/index.d.ts +18 -8
- package/dist/ir/index.js +21 -19
- package/dist/{lower-Dw5grNrI.d.ts → lower-CXggJTIo.d.ts} +20 -2
- package/dist/{lower-DcOY8ux0.d.cts → lower-DAzvsJCo.d.cts} +20 -2
- package/dist/node-evaluator-CH3XCJND.cjs +17 -0
- package/dist/node-evaluator-TULXA3WE.js +8 -0
- package/dist/quickjs/index.cjs +32 -78
- package/dist/quickjs/index.d.cts +4 -4
- package/dist/quickjs/index.d.ts +4 -4
- package/dist/quickjs/index.js +32 -78
- package/dist/roundtrip/index.cjs +201 -128
- package/dist/roundtrip/index.d.cts +7 -4
- package/dist/roundtrip/index.d.ts +7 -4
- package/dist/roundtrip/index.js +87 -18
- package/package.json +44 -18
- package/dist/chunk-265J2FCH.cjs +0 -33
- package/dist/chunk-LUXCXFOE.cjs +0 -269
- package/dist/chunk-S34NJE3A.js +0 -262
- package/dist/chunk-SRQRLWOS.js +0 -31
- package/dist/node-evaluator-2GTUZVPK.cjs +0 -17
- package/dist/node-evaluator-RMYEWCXZ.js +0 -8
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { W as WorkflowDefinition, a as JsonObject } from '../types-Dr2Fn1Ax.cjs';
|
|
2
|
-
import { m as LayoutSidecar } from '../assemble-
|
|
2
|
+
import { m as LayoutSidecar } from '../assemble-DEf3znGD.cjs';
|
|
3
3
|
import { N as NodeManifest } from '../manifest-Duf-gHdO.cjs';
|
|
4
4
|
import { P as PathSegment } from '../expressions-DhHaqyar.cjs';
|
|
5
|
-
import { E as Evaluator, a as EsbuildApi } from '../lower-
|
|
6
|
-
export { b as ESBUILD_VERSION, c as EVALUATION_GLOBAL, L as LowerError, d as
|
|
5
|
+
import { E as Evaluator, a as EsbuildApi } from '../lower-DAzvsJCo.cjs';
|
|
6
|
+
export { D as DeterminismViolationError, b as ESBUILD_VERSION, c as EVALUATION_GLOBAL, L as LowerError, d as LowerFailureReason, e as LowerOptions, f as LowerResult, g as LoweredWorkflow, h as bundleProject, i as defaultEntries, l as lower } from '../lower-DAzvsJCo.cjs';
|
|
7
7
|
import 'esbuild';
|
|
8
8
|
import '../hash-CZkTXPCX.cjs';
|
|
9
9
|
|
|
@@ -139,12 +139,13 @@ interface LiftPlan {
|
|
|
139
139
|
* - `legacy-syntax`: a `${…}` template, an edge mapping or legacy credentials kept verbatim;
|
|
140
140
|
* - `unknown-node`: a node type or operation the registry snapshot does not know, written as `nodes.custom()`;
|
|
141
141
|
* - `connection-id-only`: a connection with no name, kept as its id;
|
|
142
|
+
* - `connection-ambiguous`: a connection whose name more than one connection has, kept as its id;
|
|
142
143
|
* - `raw-node`: a node written in its exact form (`nodes.custom()` plus `extra`);
|
|
143
144
|
* - `layout-omitted`, `pinned-data-omitted`: left out by the export options (lossy);
|
|
144
145
|
* - `key-added`: the definition had no `key`; the workflow key was written;
|
|
145
146
|
* - `roundtrip-mismatch` / `lowering-failed`: lowering the code did not reproduce the IR (lossy).
|
|
146
147
|
*/
|
|
147
|
-
type FidelityItemKind = 'expression-verbatim' | 'legacy-syntax' | 'unknown-node' | 'connection-id-only' | 'raw-node' | 'layout-omitted' | 'pinned-data-omitted' | 'key-added' | 'roundtrip-mismatch' | 'lowering-failed';
|
|
148
|
+
type FidelityItemKind = 'expression-verbatim' | 'legacy-syntax' | 'unknown-node' | 'connection-id-only' | 'connection-ambiguous' | 'raw-node' | 'layout-omitted' | 'pinned-data-omitted' | 'key-added' | 'roundtrip-mismatch' | 'lowering-failed';
|
|
148
149
|
interface FidelityItem {
|
|
149
150
|
nodeId?: string;
|
|
150
151
|
path?: string;
|
|
@@ -217,6 +218,8 @@ declare function liftToPython(definition: unknown, options?: LiftOptions): Promi
|
|
|
217
218
|
interface NodeVmEvaluatorOptions {
|
|
218
219
|
/** Wall-clock budget for evaluating the bundle. Default 5000 ms. */
|
|
219
220
|
timeoutMs?: number;
|
|
221
|
+
/** Old-generation heap cap of the evaluation worker. Default 512 MiB. */
|
|
222
|
+
memoryLimitBytes?: number;
|
|
220
223
|
}
|
|
221
224
|
declare function createNodeVmEvaluator(options?: NodeVmEvaluatorOptions): Evaluator;
|
|
222
225
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { W as WorkflowDefinition, a as JsonObject } from '../types-Dr2Fn1Ax.js';
|
|
2
|
-
import { m as LayoutSidecar } from '../assemble-
|
|
2
|
+
import { m as LayoutSidecar } from '../assemble-CrpUyd_3.js';
|
|
3
3
|
import { N as NodeManifest } from '../manifest-Bp9ZJlav.js';
|
|
4
4
|
import { P as PathSegment } from '../expressions-DhHaqyar.js';
|
|
5
|
-
import { E as Evaluator, a as EsbuildApi } from '../lower-
|
|
6
|
-
export { b as ESBUILD_VERSION, c as EVALUATION_GLOBAL, L as LowerError, d as
|
|
5
|
+
import { E as Evaluator, a as EsbuildApi } from '../lower-CXggJTIo.js';
|
|
6
|
+
export { D as DeterminismViolationError, b as ESBUILD_VERSION, c as EVALUATION_GLOBAL, L as LowerError, d as LowerFailureReason, e as LowerOptions, f as LowerResult, g as LoweredWorkflow, h as bundleProject, i as defaultEntries, l as lower } from '../lower-CXggJTIo.js';
|
|
7
7
|
import 'esbuild';
|
|
8
8
|
import '../hash-CZkTXPCX.js';
|
|
9
9
|
|
|
@@ -139,12 +139,13 @@ interface LiftPlan {
|
|
|
139
139
|
* - `legacy-syntax`: a `${…}` template, an edge mapping or legacy credentials kept verbatim;
|
|
140
140
|
* - `unknown-node`: a node type or operation the registry snapshot does not know, written as `nodes.custom()`;
|
|
141
141
|
* - `connection-id-only`: a connection with no name, kept as its id;
|
|
142
|
+
* - `connection-ambiguous`: a connection whose name more than one connection has, kept as its id;
|
|
142
143
|
* - `raw-node`: a node written in its exact form (`nodes.custom()` plus `extra`);
|
|
143
144
|
* - `layout-omitted`, `pinned-data-omitted`: left out by the export options (lossy);
|
|
144
145
|
* - `key-added`: the definition had no `key`; the workflow key was written;
|
|
145
146
|
* - `roundtrip-mismatch` / `lowering-failed`: lowering the code did not reproduce the IR (lossy).
|
|
146
147
|
*/
|
|
147
|
-
type FidelityItemKind = 'expression-verbatim' | 'legacy-syntax' | 'unknown-node' | 'connection-id-only' | 'raw-node' | 'layout-omitted' | 'pinned-data-omitted' | 'key-added' | 'roundtrip-mismatch' | 'lowering-failed';
|
|
148
|
+
type FidelityItemKind = 'expression-verbatim' | 'legacy-syntax' | 'unknown-node' | 'connection-id-only' | 'connection-ambiguous' | 'raw-node' | 'layout-omitted' | 'pinned-data-omitted' | 'key-added' | 'roundtrip-mismatch' | 'lowering-failed';
|
|
148
149
|
interface FidelityItem {
|
|
149
150
|
nodeId?: string;
|
|
150
151
|
path?: string;
|
|
@@ -217,6 +218,8 @@ declare function liftToPython(definition: unknown, options?: LiftOptions): Promi
|
|
|
217
218
|
interface NodeVmEvaluatorOptions {
|
|
218
219
|
/** Wall-clock budget for evaluating the bundle. Default 5000 ms. */
|
|
219
220
|
timeoutMs?: number;
|
|
221
|
+
/** Old-generation heap cap of the evaluation worker. Default 512 MiB. */
|
|
222
|
+
memoryLimitBytes?: number;
|
|
220
223
|
}
|
|
221
224
|
declare function createNodeVmEvaluator(options?: NodeVmEvaluatorOptions): Evaluator;
|
|
222
225
|
|
package/dist/roundtrip/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { diffDefinitions } from '../chunk-
|
|
2
|
-
import { renderTypeScript, generateNodeClients, pyWorkflowName, NameAllocator, referencedLater, formatLines, formatImport, clientNames, pyString, snakeCase, pyNumber, PY_KEYWORDS } from '../chunk-
|
|
3
|
-
export { PY_LINE_LENGTH, TS_FORMAT_OPTIONS, TS_NODES_IMPORT } from '../chunk-
|
|
4
|
-
import { operationsOf, isTriggerOperation } from '../chunk-
|
|
5
|
-
export { createNodeVmEvaluator } from '../chunk-
|
|
6
|
-
import { lower } from '../chunk-
|
|
7
|
-
export { ESBUILD_VERSION, EVALUATION_GLOBAL, LowerError, bundleProject, defaultEntries, lower } from '../chunk-
|
|
8
|
-
import { assembleRecording, LAYOUT_FORMAT_VERSION, LAYOUT_FORMAT, defineWorkflow, nodes, trigger, op, internalNodes, triggers, edge, defaultEdgeId } from '../chunk-
|
|
9
|
-
import { normalizeDefinition, irHash } from '../chunk-
|
|
1
|
+
import { diffDefinitions } from '../chunk-W32BSO3M.js';
|
|
2
|
+
import { renderTypeScript, generateNodeClients, pyWorkflowName, NameAllocator, referencedLater, formatLines, formatImport, clientNames, pyString, snakeCase, pyNumber, PY_KEYWORDS } from '../chunk-XBIID5DY.js';
|
|
3
|
+
export { PY_LINE_LENGTH, TS_FORMAT_OPTIONS, TS_NODES_IMPORT } from '../chunk-XBIID5DY.js';
|
|
4
|
+
import { operationsOf, isTriggerOperation } from '../chunk-6BEW4QD6.js';
|
|
5
|
+
export { createNodeVmEvaluator } from '../chunk-5AW745OG.js';
|
|
6
|
+
import { lower } from '../chunk-MBBKGD7K.js';
|
|
7
|
+
export { DeterminismViolationError, ESBUILD_VERSION, EVALUATION_GLOBAL, LowerError, bundleProject, defaultEntries, lower } from '../chunk-MBBKGD7K.js';
|
|
8
|
+
import { assembleRecording, LAYOUT_FORMAT_VERSION, LAYOUT_FORMAT, defineWorkflow, nodes, trigger, op, internalNodes, triggers, edge, defaultEdgeId } from '../chunk-EEAIM35V.js';
|
|
9
|
+
import { normalizeDefinition, irHash } from '../chunk-6U446SKY.js';
|
|
10
10
|
import '../chunk-5LUIDMF4.js';
|
|
11
|
-
import { PREDICATE_OPERATORS, and, or, expr, RESERVED_REF_KEYS } from '../chunk-
|
|
12
|
-
import { stableStringify } from '../chunk-
|
|
13
|
-
import { isRecord, deepEqual, parseTemplate } from '../chunk-
|
|
11
|
+
import { PREDICATE_OPERATORS, BuilderError, and, or, expr, RESERVED_REF_KEYS } from '../chunk-UB2BHU2M.js';
|
|
12
|
+
import { stableStringify } from '../chunk-IHKXLG6I.js';
|
|
13
|
+
import { isRecord, setOwn, deepEqual, parseTemplate } from '../chunk-UJNHTS6D.js';
|
|
14
14
|
|
|
15
15
|
// src/roundtrip/plan.ts
|
|
16
16
|
var TYPED_HANDLES = {
|
|
@@ -379,14 +379,37 @@ function errorConfigOptions(errorConfig) {
|
|
|
379
379
|
}
|
|
380
380
|
return options2;
|
|
381
381
|
}
|
|
382
|
+
function ambiguousConnectionNames(names) {
|
|
383
|
+
const idByName = /* @__PURE__ */ new Map();
|
|
384
|
+
const ambiguous = /* @__PURE__ */ new Set();
|
|
385
|
+
for (const [id, name] of Object.entries(names)) {
|
|
386
|
+
const previous = idByName.get(name);
|
|
387
|
+
if (previous === void 0) idByName.set(name, id);
|
|
388
|
+
else if (previous !== id) ambiguous.add(name);
|
|
389
|
+
}
|
|
390
|
+
return ambiguous;
|
|
391
|
+
}
|
|
382
392
|
function connectionOptions(value2, names, nodeId, items) {
|
|
383
393
|
if (Array.isArray(value2) && value2.length > 0 && names) {
|
|
394
|
+
const ambiguous = ambiguousConnectionNames(names);
|
|
384
395
|
const resolved = value2.map((ref) => {
|
|
385
396
|
if (!isRecord(ref) || Object.keys(ref).sort().join(",") !== "adapter,connectionId")
|
|
386
397
|
return void 0;
|
|
387
398
|
const id = ref["connectionId"];
|
|
388
399
|
return typeof id === "string" && Object.hasOwn(names, id) ? names[id] : void 0;
|
|
389
400
|
});
|
|
401
|
+
const shared = resolved.filter(
|
|
402
|
+
(name) => typeof name === "string" && ambiguous.has(name)
|
|
403
|
+
);
|
|
404
|
+
if (shared.length > 0) {
|
|
405
|
+
items.push({
|
|
406
|
+
nodeId,
|
|
407
|
+
path: "args.connections",
|
|
408
|
+
kind: "connection-ambiguous",
|
|
409
|
+
detail: `The connection name ${[...new Set(shared)].map((name) => `"${name}"`).join(", ")} belongs to more than one connection; the connection id is kept`
|
|
410
|
+
});
|
|
411
|
+
return ["connections", literalOrStructure(value2)];
|
|
412
|
+
}
|
|
390
413
|
if (resolved.every((name) => typeof name === "string")) {
|
|
391
414
|
return resolved.length === 1 ? ["connection", { k: "literal", value: resolved[0] ?? "" }] : [
|
|
392
415
|
"connection",
|
|
@@ -699,15 +722,21 @@ function buildPlan(normalized, options2, rawNodeIds = /* @__PURE__ */ new Set(),
|
|
|
699
722
|
}
|
|
700
723
|
function connectionsByName(connectionNames, definition) {
|
|
701
724
|
const out = {};
|
|
725
|
+
const ambiguous = ambiguousConnectionNames(connectionNames);
|
|
702
726
|
const data = isRecord(definition["data"]) ? definition["data"] : {};
|
|
703
727
|
for (const node of Array.isArray(data["nodes"]) ? data["nodes"] : []) {
|
|
704
728
|
const args = isRecord(node) && isRecord(node["args"]) ? node["args"] : void 0;
|
|
705
729
|
for (const ref of Array.isArray(args?.["connections"]) ? args["connections"] : []) {
|
|
706
730
|
if (!isRecord(ref) || typeof ref["connectionId"] !== "string" || typeof ref["adapter"] !== "string")
|
|
707
731
|
continue;
|
|
708
|
-
const
|
|
709
|
-
|
|
710
|
-
|
|
732
|
+
const id = ref["connectionId"];
|
|
733
|
+
const name = Object.hasOwn(connectionNames, id) ? connectionNames[id] : void 0;
|
|
734
|
+
if (name === void 0 || ambiguous.has(name)) continue;
|
|
735
|
+
const previous = Object.hasOwn(out, name) ? out[name] : void 0;
|
|
736
|
+
if (previous && previous.adapter !== ref["adapter"]) {
|
|
737
|
+
ambiguous.add(name);
|
|
738
|
+
delete out[name];
|
|
739
|
+
} else setOwn(out, name, { connectionId: id, adapter: ref["adapter"] });
|
|
711
740
|
}
|
|
712
741
|
}
|
|
713
742
|
return out;
|
|
@@ -1090,7 +1119,7 @@ function layoutOf(reference) {
|
|
|
1090
1119
|
for (const node of Array.isArray(data["nodes"]) ? data["nodes"] : []) {
|
|
1091
1120
|
if (!isRecord(node) || typeof node["id"] !== "string" || !isRecord(node["position"])) continue;
|
|
1092
1121
|
const { x, y } = node["position"];
|
|
1093
|
-
if (typeof x === "number" && typeof y === "number") positions
|
|
1122
|
+
if (typeof x === "number" && typeof y === "number") setOwn(positions, node["id"], { x, y });
|
|
1094
1123
|
}
|
|
1095
1124
|
const sidecar = {
|
|
1096
1125
|
format: LAYOUT_FORMAT,
|
|
@@ -1129,6 +1158,37 @@ function mismatches(reference, candidate) {
|
|
|
1129
1158
|
};
|
|
1130
1159
|
return { nodes: nodes2, edges, document: !deepEqual(strip(reference), strip(candidate)) };
|
|
1131
1160
|
}
|
|
1161
|
+
function tryRun(attempt) {
|
|
1162
|
+
try {
|
|
1163
|
+
return attempt();
|
|
1164
|
+
} catch (error) {
|
|
1165
|
+
if (error instanceof BuilderError) return void 0;
|
|
1166
|
+
throw error;
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
function rejectedByBuilder(reference, run) {
|
|
1170
|
+
const nodes2 = /* @__PURE__ */ new Set();
|
|
1171
|
+
const edges = /* @__PURE__ */ new Set();
|
|
1172
|
+
const data = isRecord(reference["data"]) ? reference["data"] : {};
|
|
1173
|
+
const nodeIds = (Array.isArray(data["nodes"]) ? data["nodes"] : []).flatMap(
|
|
1174
|
+
(node) => isRecord(node) && typeof node["id"] === "string" ? [node["id"]] : []
|
|
1175
|
+
);
|
|
1176
|
+
const edgeCount = Array.isArray(data["edges"]) ? data["edges"].length : 0;
|
|
1177
|
+
const edgeIndices = Array.from({ length: edgeCount }, (_, index) => index);
|
|
1178
|
+
const allNodes = new Set(nodeIds);
|
|
1179
|
+
const allEdges = new Set(edgeIndices);
|
|
1180
|
+
for (const id of nodeIds) {
|
|
1181
|
+
const others = new Set(allNodes);
|
|
1182
|
+
others.delete(id);
|
|
1183
|
+
if (tryRun(() => run(others, allEdges)) === void 0) nodes2.add(id);
|
|
1184
|
+
}
|
|
1185
|
+
for (const index of edgeIndices) {
|
|
1186
|
+
const others = new Set(allEdges);
|
|
1187
|
+
others.delete(index);
|
|
1188
|
+
if (tryRun(() => run(allNodes, others)) === void 0) edges.add(index);
|
|
1189
|
+
}
|
|
1190
|
+
return { nodes: nodes2, edges };
|
|
1191
|
+
}
|
|
1132
1192
|
function prepareLift(definition, options2 = {}) {
|
|
1133
1193
|
const normalized = normalizeDefinition(definition);
|
|
1134
1194
|
if (!isRecord(normalized) || !isRecord(normalized["data"]))
|
|
@@ -1168,9 +1228,18 @@ function prepareLift(definition, options2 = {}) {
|
|
|
1168
1228
|
});
|
|
1169
1229
|
return { build, candidate: normalizeDefinition(candidate) };
|
|
1170
1230
|
};
|
|
1171
|
-
let
|
|
1231
|
+
let rejected = { nodes: /* @__PURE__ */ new Set(), edges: /* @__PURE__ */ new Set() };
|
|
1232
|
+
let attempt = tryRun(() => run(rejected.nodes, rejected.edges));
|
|
1233
|
+
if (attempt === void 0) {
|
|
1234
|
+
rejected = rejectedByBuilder(reference, run);
|
|
1235
|
+
attempt = run(rejected.nodes, rejected.edges);
|
|
1236
|
+
}
|
|
1172
1237
|
const first = mismatches(reference, attempt.candidate);
|
|
1173
|
-
if (first.nodes.size > 0 || first.edges.size > 0)
|
|
1238
|
+
if (first.nodes.size > 0 || first.edges.size > 0)
|
|
1239
|
+
attempt = run(
|
|
1240
|
+
/* @__PURE__ */ new Set([...rejected.nodes, ...first.nodes]),
|
|
1241
|
+
/* @__PURE__ */ new Set([...rejected.edges, ...first.edges])
|
|
1242
|
+
);
|
|
1174
1243
|
const residual = mismatches(reference, attempt.candidate);
|
|
1175
1244
|
for (const id of residual.nodes)
|
|
1176
1245
|
items.push({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidgrids/workflows",
|
|
3
|
-
"version": "2026.1027.
|
|
3
|
+
"version": "2026.1027.1",
|
|
4
4
|
"description": "Author FluidGrids workflows as code: the IR v2 schema and tools, the tier-1 graph builder, lift and lower between canvas JSON, TypeScript and Python, and typed node client generation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -8,29 +8,54 @@
|
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
"import": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"default": "./dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"require": {
|
|
16
|
+
"types": "./dist/index.d.cts",
|
|
17
|
+
"default": "./dist/index.cjs"
|
|
18
|
+
}
|
|
14
19
|
},
|
|
15
20
|
"./ir": {
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
21
|
+
"import": {
|
|
22
|
+
"types": "./dist/ir/index.d.ts",
|
|
23
|
+
"default": "./dist/ir/index.js"
|
|
24
|
+
},
|
|
25
|
+
"require": {
|
|
26
|
+
"types": "./dist/ir/index.d.cts",
|
|
27
|
+
"default": "./dist/ir/index.cjs"
|
|
28
|
+
}
|
|
19
29
|
},
|
|
20
30
|
"./roundtrip": {
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
31
|
+
"import": {
|
|
32
|
+
"types": "./dist/roundtrip/index.d.ts",
|
|
33
|
+
"default": "./dist/roundtrip/index.js"
|
|
34
|
+
},
|
|
35
|
+
"require": {
|
|
36
|
+
"types": "./dist/roundtrip/index.d.cts",
|
|
37
|
+
"default": "./dist/roundtrip/index.cjs"
|
|
38
|
+
}
|
|
24
39
|
},
|
|
25
40
|
"./codegen": {
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
41
|
+
"import": {
|
|
42
|
+
"types": "./dist/codegen/index.d.ts",
|
|
43
|
+
"default": "./dist/codegen/index.js"
|
|
44
|
+
},
|
|
45
|
+
"require": {
|
|
46
|
+
"types": "./dist/codegen/index.d.cts",
|
|
47
|
+
"default": "./dist/codegen/index.cjs"
|
|
48
|
+
}
|
|
29
49
|
},
|
|
30
50
|
"./quickjs": {
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
51
|
+
"import": {
|
|
52
|
+
"types": "./dist/quickjs/index.d.ts",
|
|
53
|
+
"default": "./dist/quickjs/index.js"
|
|
54
|
+
},
|
|
55
|
+
"require": {
|
|
56
|
+
"types": "./dist/quickjs/index.d.cts",
|
|
57
|
+
"default": "./dist/quickjs/index.cjs"
|
|
58
|
+
}
|
|
34
59
|
},
|
|
35
60
|
"./schema/ir-v2.schema.json": "./schema/ir-v2.schema.json",
|
|
36
61
|
"./package.json": "./package.json"
|
|
@@ -56,9 +81,10 @@
|
|
|
56
81
|
"format:check": "prettier --check \"src/**/*.ts\" \"tests/**/*.ts\" \"scripts/**/*.ts\" \"*.{json,md}\"",
|
|
57
82
|
"typecheck": "bun run generate && bash scripts/build-limits.sh tsc --noEmit -p tsconfig.json && bash scripts/build-limits.sh tsc -p tsconfig.test.json && bash scripts/build-limits.sh tsc -p tsconfig.fixtures.json",
|
|
58
83
|
"check:fixtures": "bun scripts/check-fixtures.ts",
|
|
59
|
-
"sanity": "bash scripts/build-limits.sh --gate bash -c 'bun run format:check && bun run lint:check && bun run typecheck && bun run test:coverage && bun run build && bun run check:fixtures'",
|
|
84
|
+
"sanity": "bash scripts/build-limits.sh --gate bash -c 'bun run format:check && bun run lint:check && bun run typecheck && bun run test:coverage && bun run build && bun run check:exports && bun run check:fixtures'",
|
|
60
85
|
"prepublishOnly": "bun run build",
|
|
61
|
-
"clean": "rm -rf dist coverage src/generated"
|
|
86
|
+
"clean": "rm -rf dist coverage src/generated",
|
|
87
|
+
"check:exports": "bash scripts/build-limits.sh tsc -p scripts/exports-check/tsconfig.json"
|
|
62
88
|
},
|
|
63
89
|
"keywords": [
|
|
64
90
|
"fluidgrids",
|
package/dist/chunk-265J2FCH.cjs
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkLUXCXFOE_cjs = require('./chunk-LUXCXFOE.cjs');
|
|
4
|
-
var vm = require('vm');
|
|
5
|
-
|
|
6
|
-
function createNodeVmEvaluator(options = {}) {
|
|
7
|
-
const timeout = options.timeoutMs ?? 5e3;
|
|
8
|
-
return {
|
|
9
|
-
format: "iife",
|
|
10
|
-
evaluate(code) {
|
|
11
|
-
const context = vm.createContext(/* @__PURE__ */ Object.create(null), {
|
|
12
|
-
codeGeneration: { strings: false, wasm: false },
|
|
13
|
-
name: "fluidgrids-workflow-lowering"
|
|
14
|
-
});
|
|
15
|
-
try {
|
|
16
|
-
const script = new vm.Script(`${code}
|
|
17
|
-
;${chunkLUXCXFOE_cjs.EVALUATION_GLOBAL}.__fluidgrids;`, {
|
|
18
|
-
filename: "workflow-bundle.js"
|
|
19
|
-
});
|
|
20
|
-
const result = script.runInContext(context, { timeout, breakOnSigint: true });
|
|
21
|
-
if (typeof result !== "string")
|
|
22
|
-
throw new chunkLUXCXFOE_cjs.LowerError("The bundle did not export a workflow collection");
|
|
23
|
-
return Promise.resolve(result);
|
|
24
|
-
} catch (error) {
|
|
25
|
-
if (error instanceof chunkLUXCXFOE_cjs.LowerError) return Promise.reject(error);
|
|
26
|
-
const message = typeof error === "object" && error !== null && "message" in error ? String(error.message) : String(error);
|
|
27
|
-
return Promise.reject(new chunkLUXCXFOE_cjs.LowerError(`Evaluating the workflow code failed: ${message}`));
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
exports.createNodeVmEvaluator = createNodeVmEvaluator;
|