@fluidgrids/workflows 2026.1027.0 → 2026.1028.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 +170 -18
- package/dist/activation-BBh1p82z.d.cts +57 -0
- package/dist/activation-DnhG7SmF.d.ts +57 -0
- package/dist/assemble-BLqQ8lSu.d.cts +39 -0
- package/dist/assemble-DWgaXHd-.d.ts +39 -0
- package/dist/chunk-2DP2Y6EU.cjs +832 -0
- package/dist/chunk-2J6TF7YI.cjs +86 -0
- package/dist/chunk-3FOTFQ3J.js +1622 -0
- package/dist/chunk-4LYSEANA.js +199 -0
- package/dist/{chunk-KUTMY2IO.cjs → chunk-57MSZ24T.cjs} +162 -98
- package/dist/{chunk-BWSLWF2E.js → chunk-5HDSBTBX.js} +99 -32
- package/dist/chunk-623FVQSN.cjs +251 -0
- package/dist/{chunk-4DPEGDPW.js → chunk-6FSHT5IL.js} +4 -4
- package/dist/{chunk-REV7ZOA4.js → chunk-7AAZGVKD.js} +1 -35
- package/dist/chunk-7NQ37GZU.js +73 -0
- package/dist/chunk-ABFZWYHT.js +612 -0
- package/dist/{chunk-SS4LT2IP.js → chunk-BD7ZPG53.js} +5 -10
- package/dist/chunk-BO6OVILK.js +79 -0
- package/dist/chunk-C5OLWZ42.js +245 -0
- package/dist/chunk-CBL5JSCC.cjs +75 -0
- package/dist/{chunk-LSKSBVL4.cjs → chunk-CPDK3K5N.cjs} +6 -6
- package/dist/chunk-CSNWNFKU.cjs +1635 -0
- package/dist/chunk-DJYMDLV5.js +227 -0
- package/dist/{chunk-X4HKU3MX.js → chunk-E2VK7J2C.js} +3 -1
- package/dist/chunk-FMSW2HDF.cjs +267 -0
- package/dist/chunk-FQIHX7YI.cjs +80 -0
- package/dist/chunk-FR7KYWRO.cjs +41 -0
- package/dist/{chunk-AU3YW7FZ.cjs → chunk-GBQ33SIZ.cjs} +46 -51
- package/dist/{chunk-RRQ5HOBF.cjs → chunk-GVTZMA5C.cjs} +4 -4
- package/dist/chunk-H7KEVW2M.js +816 -0
- package/dist/chunk-HR3BN4C4.cjs +27 -0
- package/dist/chunk-IISBRUWJ.js +13 -0
- package/dist/chunk-JD2VQIDZ.cjs +15 -0
- package/dist/{chunk-PL73GJR4.js → chunk-JZ4TOOLN.js} +1 -1
- package/dist/chunk-L24YIZY7.cjs +207 -0
- package/dist/chunk-LNUQE6D6.js +39 -0
- package/dist/{chunk-BYJ7QTLY.cjs → chunk-NEIUQASE.cjs} +13 -13
- package/dist/chunk-P6TA5EZT.cjs +634 -0
- package/dist/chunk-PDHLTDZB.js +72 -0
- package/dist/chunk-PMCM2OH4.js +46 -0
- package/dist/chunk-PZCVF76Q.cjs +868 -0
- package/dist/{chunk-GO34UHSY.js → chunk-QAN5MZEM.js} +3 -3
- package/dist/{chunk-27HASETB.cjs → chunk-QKZL3ONM.cjs} +3 -1
- package/dist/chunk-SAENRNBJ.cjs +52 -0
- package/dist/{chunk-LMX35GNQ.js → chunk-SMCANK3F.js} +5 -4
- package/dist/{chunk-IZQNUNSU.cjs → chunk-SX2PNKKT.cjs} +18 -17
- package/dist/{chunk-LRM6JXJA.cjs → chunk-TBDXTV22.cjs} +0 -37
- package/dist/chunk-VOKMAAJP.js +848 -0
- package/dist/chunk-XB53G2DK.js +25 -0
- package/dist/chunk-Z2Y65YOY.cjs +7 -0
- package/dist/codegen/index.cjs +9 -7
- package/dist/codegen/index.d.cts +2 -2
- package/dist/codegen/index.d.ts +2 -2
- package/dist/codegen/index.js +6 -5
- package/dist/file-BOoHZgoQ.d.cts +1557 -0
- package/dist/file-yuPCFU5b.d.ts +1557 -0
- package/dist/history/index.cjs +287 -0
- package/dist/history/index.d.cts +157 -0
- package/dist/history/index.d.ts +157 -0
- package/dist/history/index.js +5 -0
- package/dist/index.cjs +134 -36
- package/dist/index.d.cts +137 -9
- package/dist/index.d.ts +137 -9
- package/dist/index.js +8 -3
- package/dist/ir/index.cjs +161 -165
- package/dist/ir/index.d.cts +32 -12
- package/dist/ir/index.d.ts +32 -12
- package/dist/ir/index.js +54 -61
- package/dist/lower-BuSvAFqi.d.cts +129 -0
- package/dist/lower-C_Qv_34S.d.ts +129 -0
- package/dist/lower-types-nofRXw9c.d.cts +15 -0
- package/dist/lower-types-nofRXw9c.d.ts +15 -0
- package/dist/{manifest-Duf-gHdO.d.cts → manifest-0OLw0i7k.d.cts} +1 -1
- package/dist/{manifest-Bp9ZJlav.d.ts → manifest-C8N6HDYl.d.ts} +1 -1
- package/dist/node-evaluator-CJNP4GHX.js +12 -0
- package/dist/node-evaluator-DMKPKUWA.cjs +22 -0
- package/dist/quickjs/index.cjs +256 -78
- package/dist/quickjs/index.d.cts +48 -7
- package/dist/quickjs/index.d.ts +48 -7
- package/dist/quickjs/index.js +254 -79
- package/dist/roundtrip/index.cjs +404 -129
- package/dist/roundtrip/index.d.cts +43 -8
- package/dist/roundtrip/index.d.ts +43 -8
- package/dist/roundtrip/index.js +260 -19
- package/dist/runtime/index.cjs +90 -0
- package/dist/runtime/index.d.cts +297 -0
- package/dist/runtime/index.d.ts +297 -0
- package/dist/runtime/index.js +8 -0
- package/dist/testing/index.cjs +1057 -0
- package/dist/testing/index.d.cts +305 -0
- package/dist/testing/index.d.ts +305 -0
- package/dist/testing/index.js +1037 -0
- package/dist/{types-Dr2Fn1Ax.d.ts → types-BGoPzgcl.d.cts} +1 -1
- package/dist/{types-Dr2Fn1Ax.d.cts → types-BGoPzgcl.d.ts} +1 -1
- package/dist/types-CpBBjaGX.d.cts +380 -0
- package/dist/types-DV-HX_Gt.d.ts +380 -0
- package/dist/{assemble-DMOuaxRI.d.ts → workflow-Bpr3vnA_.d.ts} +60 -162
- package/dist/workflow-C2a05WUJ.d.ts +444 -0
- package/dist/{assemble-BJo9TECS.d.cts → workflow-FXUkpIBc.d.cts} +60 -162
- package/dist/workflow-J-yYixny.d.cts +444 -0
- package/fixtures/README.md +128 -0
- package/fixtures/histories/activity-failure-fails-run.history.json +163 -0
- package/fixtures/histories/activity-retry-then-success.history.json +147 -0
- package/fixtures/histories/cancel-activity-abandon.history.json +126 -0
- package/fixtures/histories/cancel-activity-compensate.history.json +307 -0
- package/fixtures/histories/cancel-concurrent-non-cancellable.history.json +234 -0
- package/fixtures/histories/cancel-concurrent-scope-timeout.history.json +184 -0
- package/fixtures/histories/cancel-condition-after-cancel.history.json +200 -0
- package/fixtures/histories/cancel-during-timer.history.json +123 -0
- package/fixtures/histories/cancel-saga-compensations.history.json +325 -0
- package/fixtures/histories/cancel-scope-timeout.history.json +148 -0
- package/fixtures/histories/child-abandon-outlives-parent.history.json +191 -0
- package/fixtures/histories/child-cancel-default.history.json +234 -0
- package/fixtures/histories/child-cancel-request.history.json +206 -0
- package/fixtures/histories/child-durable-child-side.history.json +124 -0
- package/fixtures/histories/child-durable-result.history.json +163 -0
- package/fixtures/histories/child-failure-caught.history.json +166 -0
- package/fixtures/histories/child-graph-by-key.history.json +138 -0
- package/fixtures/histories/child-terminated-by-parent-close.history.json +85 -0
- package/fixtures/histories/continue-as-new-first-run.history.json +146 -0
- package/fixtures/histories/continue-as-new-history-limit.history.json +489 -0
- package/fixtures/histories/continue-as-new-last-run.history.json +147 -0
- package/fixtures/histories/continue-as-new-suggested.history.json +352 -0
- package/fixtures/histories/details-and-context.history.json +176 -0
- package/fixtures/histories/deterministic-values.history.json +128 -0
- package/fixtures/histories/engine-builtins.history.json +172 -0
- package/fixtures/histories/gather-activities.history.json +291 -0
- package/fixtures/histories/gather-all-settled.history.json +219 -0
- package/fixtures/histories/gather-mixed.history.json +281 -0
- package/fixtures/histories/input-during-running-task.history.json +111 -0
- package/fixtures/histories/nondeterminism-reordered.history.json +218 -0
- package/fixtures/histories/patched-deprecated.history.json +271 -0
- package/fixtures/histories/patched-new-run.history.json +270 -0
- package/fixtures/histories/patched-old-history.history.json +190 -0
- package/fixtures/histories/race-activity-wins.history.json +152 -0
- package/fixtures/histories/race-signal-beats-child.history.json +161 -0
- package/fixtures/histories/race-timeout-wins.history.json +118 -0
- package/fixtures/histories/side-effect-recorded.history.json +153 -0
- package/fixtures/histories/signal-buffered-at-start.history.json +157 -0
- package/fixtures/histories/signal-default-handler.history.json +187 -0
- package/fixtures/histories/signal-handler.history.json +191 -0
- package/fixtures/histories/signal-parent-child-side.history.json +132 -0
- package/fixtures/histories/signal-parent.history.json +202 -0
- package/fixtures/histories/signal-run-delivered.history.json +128 -0
- package/fixtures/histories/signal-run-undelivered.history.json +134 -0
- package/fixtures/histories/signal-wait.history.json +111 -0
- package/fixtures/histories/task-failure-code-error.history.json +137 -0
- package/fixtures/histories/task-failure-then-transient-attempt.history.json +140 -0
- package/fixtures/histories/timer-condition-met.history.json +201 -0
- package/fixtures/histories/timer-condition-timeout.history.json +118 -0
- package/fixtures/histories/timer-sleep-once.history.json +118 -0
- package/fixtures/histories/timer-sleep-sequence.history.json +210 -0
- package/fixtures/histories/update-accepted-completed.history.json +149 -0
- package/fixtures/histories/update-with-start-rejected-validation.history.json +91 -0
- package/package.json +85 -20
- package/schema/history-file.schema.json +2544 -0
- package/schema/ir-v2.schema.json +16 -0
- package/schema/run-event.schema.json +2374 -0
- package/schema/workflow-command.schema.json +1095 -0
- package/schema/workflow-task.schema.json +3560 -0
- 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/lower-DcOY8ux0.d.cts +0 -49
- package/dist/lower-Dw5grNrI.d.ts +0 -49
- package/dist/node-evaluator-2GTUZVPK.cjs +0 -17
- package/dist/node-evaluator-RMYEWCXZ.js +0 -8
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkG4UEPUGO_cjs = require('./chunk-G4UEPUGO.cjs');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var chunkQKZL3ONM_cjs = require('./chunk-QKZL3ONM.cjs');
|
|
5
|
+
var chunkSAENRNBJ_cjs = require('./chunk-SAENRNBJ.cjs');
|
|
6
6
|
|
|
7
7
|
// src/ir/node-types.ts
|
|
8
8
|
var EXECUTOR_INTERNAL_TYPES = /* @__PURE__ */ new Set([
|
|
@@ -82,58 +82,52 @@ function firstTruthy(...values) {
|
|
|
82
82
|
return void 0;
|
|
83
83
|
}
|
|
84
84
|
function readPosition(value) {
|
|
85
|
-
if (!
|
|
85
|
+
if (!chunkSAENRNBJ_cjs.isRecord(value)) return void 0;
|
|
86
86
|
const { x, y } = value;
|
|
87
87
|
return typeof x === "number" && typeof y === "number" && Number.isFinite(x) && Number.isFinite(y) ? { x, y } : void 0;
|
|
88
88
|
}
|
|
89
89
|
function removeIfEmpty(parent, key) {
|
|
90
90
|
const value = parent[key];
|
|
91
|
-
if (
|
|
91
|
+
if (chunkSAENRNBJ_cjs.isRecord(value) && Object.keys(value).length === 0) delete parent[key];
|
|
92
92
|
}
|
|
93
93
|
function normalizeLabel(node, data) {
|
|
94
94
|
if (node["label"] === void 0 && typeof data["label"] === "string")
|
|
95
95
|
node["label"] = data["label"];
|
|
96
|
-
if (data["label"] !== void 0 &&
|
|
96
|
+
if (data["label"] !== void 0 && chunkSAENRNBJ_cjs.deepEqual(data["label"], node["label"])) delete data["label"];
|
|
97
97
|
}
|
|
98
98
|
function normalizeOperation(node, data) {
|
|
99
99
|
if (!isNonEmptyString(node["operation_name"]) && isNonEmptyString(data["operation_name"])) {
|
|
100
100
|
node["operation_name"] = data["operation_name"];
|
|
101
101
|
}
|
|
102
|
-
if (data["operation_name"] !== void 0 && chunkLRM6JXJA_cjs.deepEqual(data["operation_name"], node["operation_name"])) {
|
|
103
|
-
delete data["operation_name"];
|
|
104
|
-
}
|
|
105
102
|
}
|
|
106
103
|
function normalizeVersion(node, data, merged) {
|
|
107
104
|
if (merged) return;
|
|
108
105
|
const effective = firstTruthy(data["version"], node["version"]);
|
|
109
106
|
if (typeof effective === "string") node["version"] = effective;
|
|
110
|
-
if (data["
|
|
111
|
-
delete data["version"];
|
|
112
|
-
if (data["nodeVersion"] !== void 0 && chunkLRM6JXJA_cjs.deepEqual(data["nodeVersion"], node["version"])) {
|
|
107
|
+
if (data["nodeVersion"] !== void 0 && chunkSAENRNBJ_cjs.deepEqual(data["nodeVersion"], node["version"])) {
|
|
113
108
|
delete data["nodeVersion"];
|
|
114
109
|
}
|
|
115
110
|
}
|
|
116
111
|
function normalizeExternalState(node, data) {
|
|
117
|
-
const args =
|
|
118
|
-
const dataArgs =
|
|
119
|
-
const effective = firstTruthy(args?.["state"], dataArgs?.["state"]
|
|
112
|
+
const args = chunkSAENRNBJ_cjs.isRecord(node["args"]) ? node["args"] : void 0;
|
|
113
|
+
const dataArgs = chunkSAENRNBJ_cjs.isRecord(data["args"]) ? data["args"] : void 0;
|
|
114
|
+
const effective = firstTruthy(args?.["state"], dataArgs?.["state"]);
|
|
120
115
|
if (effective !== void 0 && args?.["state"] === void 0) {
|
|
121
116
|
const nextArgs = args ?? {};
|
|
122
117
|
nextArgs["state"] = effective;
|
|
123
118
|
node["args"] = nextArgs;
|
|
124
119
|
}
|
|
125
|
-
const rootState =
|
|
126
|
-
if (dataArgs && dataArgs["state"] !== void 0 &&
|
|
120
|
+
const rootState = chunkSAENRNBJ_cjs.isRecord(node["args"]) ? node["args"]["state"] : void 0;
|
|
121
|
+
if (dataArgs && dataArgs["state"] !== void 0 && chunkSAENRNBJ_cjs.deepEqual(dataArgs["state"], rootState)) {
|
|
127
122
|
delete dataArgs["state"];
|
|
128
123
|
}
|
|
129
|
-
if (data["state"] !== void 0 && chunkLRM6JXJA_cjs.deepEqual(data["state"], rootState)) delete data["state"];
|
|
130
124
|
}
|
|
131
125
|
function normalizeMergedState(node, data) {
|
|
132
|
-
const args =
|
|
133
|
-
const dataArgs =
|
|
134
|
-
const config =
|
|
135
|
-
const dataState =
|
|
136
|
-
const rootState =
|
|
126
|
+
const args = chunkSAENRNBJ_cjs.isRecord(node["args"]) ? node["args"] : {};
|
|
127
|
+
const dataArgs = chunkSAENRNBJ_cjs.isRecord(data["args"]) ? data["args"] : void 0;
|
|
128
|
+
const config = chunkSAENRNBJ_cjs.isRecord(node["config"]) ? node["config"] : void 0;
|
|
129
|
+
const dataState = chunkSAENRNBJ_cjs.isRecord(dataArgs?.["state"]) ? dataArgs["state"] : void 0;
|
|
130
|
+
const rootState = chunkSAENRNBJ_cjs.isRecord(args["state"]) ? args["state"] : void 0;
|
|
137
131
|
if (config === void 0 && dataState === void 0) return;
|
|
138
132
|
args["state"] = { ...config, ...dataState, ...rootState };
|
|
139
133
|
node["args"] = args;
|
|
@@ -141,41 +135,42 @@ function normalizeMergedState(node, data) {
|
|
|
141
135
|
if (dataArgs && dataState !== void 0) delete dataArgs["state"];
|
|
142
136
|
}
|
|
143
137
|
function normalizeConnections(node, data) {
|
|
144
|
-
const dataArgs =
|
|
138
|
+
const dataArgs = chunkSAENRNBJ_cjs.isRecord(data["args"]) ? data["args"] : void 0;
|
|
145
139
|
if (!dataArgs) return;
|
|
146
140
|
for (const key of ["connections", "credentials"]) {
|
|
147
|
-
const args =
|
|
141
|
+
const args = chunkSAENRNBJ_cjs.isRecord(node["args"]) ? node["args"] : void 0;
|
|
148
142
|
if (!args?.[key] && dataArgs[key]) {
|
|
149
143
|
const nextArgs = args ?? {};
|
|
150
144
|
nextArgs[key] = dataArgs[key];
|
|
151
145
|
node["args"] = nextArgs;
|
|
152
146
|
}
|
|
153
|
-
const rootValue =
|
|
154
|
-
if (dataArgs[key] !== void 0 &&
|
|
147
|
+
const rootValue = chunkSAENRNBJ_cjs.isRecord(node["args"]) ? node["args"][key] : void 0;
|
|
148
|
+
if (dataArgs[key] !== void 0 && chunkSAENRNBJ_cjs.deepEqual(dataArgs[key], rootValue)) delete dataArgs[key];
|
|
155
149
|
}
|
|
156
150
|
}
|
|
157
151
|
function normalizeContext(node, data) {
|
|
158
|
-
const dataArgs =
|
|
159
|
-
const args =
|
|
152
|
+
const dataArgs = chunkSAENRNBJ_cjs.isRecord(data["args"]) ? data["args"] : void 0;
|
|
153
|
+
const args = chunkSAENRNBJ_cjs.isRecord(node["args"]) ? node["args"] : void 0;
|
|
160
154
|
if (!dataArgs || dataArgs["context"] === void 0) return;
|
|
161
|
-
if (args &&
|
|
155
|
+
if (args && chunkSAENRNBJ_cjs.deepEqual(dataArgs["context"], args["context"])) delete dataArgs["context"];
|
|
162
156
|
}
|
|
163
157
|
function normalizeErrorConfig(node, data) {
|
|
164
|
-
const dataArgs =
|
|
165
|
-
const dataState =
|
|
158
|
+
const dataArgs = chunkSAENRNBJ_cjs.isRecord(data["args"]) ? data["args"] : void 0;
|
|
159
|
+
const dataState = chunkSAENRNBJ_cjs.isRecord(dataArgs?.["state"]) ? dataArgs["state"] : void 0;
|
|
166
160
|
const effective = node["errorConfig"] ?? data["errorConfig"] ?? dataState?.["errorConfig"];
|
|
167
161
|
if (effective !== void 0 && effective !== null) node["errorConfig"] = effective;
|
|
168
|
-
if (
|
|
162
|
+
else if (node["errorConfig"] === null) delete node["errorConfig"];
|
|
163
|
+
if (data["errorConfig"] !== void 0 && chunkSAENRNBJ_cjs.deepEqual(data["errorConfig"], node["errorConfig"])) {
|
|
169
164
|
delete data["errorConfig"];
|
|
170
165
|
}
|
|
171
166
|
}
|
|
172
167
|
function normalizeExecutionSettings(node, data) {
|
|
173
|
-
const root =
|
|
174
|
-
const mirror =
|
|
168
|
+
const root = chunkSAENRNBJ_cjs.isRecord(node["executionSettings"]) ? node["executionSettings"] : void 0;
|
|
169
|
+
const mirror = chunkSAENRNBJ_cjs.isRecord(data["executionSettings"]) ? data["executionSettings"] : void 0;
|
|
175
170
|
if (!root && !mirror) return;
|
|
176
171
|
const merged = { ...root };
|
|
177
172
|
for (const [key, value] of Object.entries(mirror ?? {}))
|
|
178
|
-
if (!Object.hasOwn(merged, key)) merged
|
|
173
|
+
if (!Object.hasOwn(merged, key)) chunkSAENRNBJ_cjs.setOwn(merged, key, value);
|
|
179
174
|
if (root?.["executeOnce"] === true || mirror?.["executeOnce"] === true)
|
|
180
175
|
merged["executeOnce"] = true;
|
|
181
176
|
if (mirror && Object.hasOwn(mirror, "runOn")) {
|
|
@@ -191,11 +186,11 @@ function normalizeDisabled(node, data) {
|
|
|
191
186
|
delete data["disabled"];
|
|
192
187
|
}
|
|
193
188
|
function normalizeNode(raw) {
|
|
194
|
-
if (!
|
|
195
|
-
const node =
|
|
189
|
+
if (!chunkSAENRNBJ_cjs.isRecord(raw)) return raw;
|
|
190
|
+
const node = chunkSAENRNBJ_cjs.cloneJson(raw);
|
|
196
191
|
const type = typeof node["type"] === "string" ? node["type"] : "";
|
|
197
192
|
const merged = usesMergedParameters(type);
|
|
198
|
-
const data =
|
|
193
|
+
const data = chunkSAENRNBJ_cjs.isRecord(node["data"]) ? node["data"] : {};
|
|
199
194
|
normalizeLabel(node, data);
|
|
200
195
|
normalizeOperation(node, data);
|
|
201
196
|
normalizeVersion(node, data, merged);
|
|
@@ -206,28 +201,28 @@ function normalizeNode(raw) {
|
|
|
206
201
|
normalizeContext(node, data);
|
|
207
202
|
normalizeExecutionSettings(node, data);
|
|
208
203
|
normalizeDisabled(node, data);
|
|
209
|
-
if (
|
|
204
|
+
if (chunkSAENRNBJ_cjs.isRecord(data["args"])) removeIfEmpty(data, "args");
|
|
210
205
|
if (Object.keys(data).length === 0) delete node["data"];
|
|
211
206
|
else node["data"] = data;
|
|
212
207
|
return node;
|
|
213
208
|
}
|
|
214
209
|
function normalizeDefinition(definition) {
|
|
215
|
-
if (!
|
|
216
|
-
const doc =
|
|
210
|
+
if (!chunkSAENRNBJ_cjs.isRecord(definition) || !chunkSAENRNBJ_cjs.isRecord(definition["data"])) return definition;
|
|
211
|
+
const doc = chunkSAENRNBJ_cjs.cloneJson(definition);
|
|
217
212
|
const data = doc["data"];
|
|
218
213
|
const rawNodes = Array.isArray(data["nodes"]) ? data["nodes"] : [];
|
|
219
214
|
const nodes = rawNodes.map(normalizeNode);
|
|
220
215
|
data["nodes"] = nodes;
|
|
221
|
-
const edges = Array.isArray(data["edges"]) ? data["edges"].filter(
|
|
216
|
+
const edges = Array.isArray(data["edges"]) ? data["edges"].filter(chunkSAENRNBJ_cjs.isRecord) : [];
|
|
222
217
|
const ids = nodes.flatMap(
|
|
223
|
-
(node) =>
|
|
218
|
+
(node) => chunkSAENRNBJ_cjs.isRecord(node) && typeof node["id"] === "string" ? [node["id"]] : []
|
|
224
219
|
);
|
|
225
220
|
const missing = nodes.some(
|
|
226
|
-
(node) =>
|
|
221
|
+
(node) => chunkSAENRNBJ_cjs.isRecord(node) && readPosition(node["position"]) === void 0
|
|
227
222
|
);
|
|
228
223
|
if (missing) {
|
|
229
|
-
const meta =
|
|
230
|
-
const metaLayout =
|
|
224
|
+
const meta = chunkSAENRNBJ_cjs.isRecord(doc["meta"]) ? doc["meta"] : void 0;
|
|
225
|
+
const metaLayout = chunkSAENRNBJ_cjs.isRecord(meta?.["layout"]) ? meta["layout"] : void 0;
|
|
231
226
|
const computed = chunkG4UEPUGO_cjs.autoLayout(
|
|
232
227
|
ids,
|
|
233
228
|
edges.flatMap(
|
|
@@ -235,7 +230,7 @@ function normalizeDefinition(definition) {
|
|
|
235
230
|
)
|
|
236
231
|
);
|
|
237
232
|
for (const node of nodes) {
|
|
238
|
-
if (!
|
|
233
|
+
if (!chunkSAENRNBJ_cjs.isRecord(node) || typeof node["id"] !== "string") continue;
|
|
239
234
|
if (readPosition(node["position"]) !== void 0) continue;
|
|
240
235
|
const fromMeta = readPosition(metaLayout?.[node["id"]]);
|
|
241
236
|
const position = fromMeta ?? computed.get(node["id"]);
|
|
@@ -249,22 +244,22 @@ function normalizeDefinition(definition) {
|
|
|
249
244
|
// src/ir/hash.ts
|
|
250
245
|
function hashedProjection(definition) {
|
|
251
246
|
const normalized = normalizeDefinition(definition);
|
|
252
|
-
if (!
|
|
247
|
+
if (!chunkSAENRNBJ_cjs.isRecord(normalized)) return normalized;
|
|
253
248
|
const copy = { ...normalized };
|
|
254
249
|
delete copy["authoring"];
|
|
255
250
|
return copy;
|
|
256
251
|
}
|
|
257
252
|
function irHash(definition) {
|
|
258
|
-
return
|
|
253
|
+
return chunkQKZL3ONM_cjs.sha256Tagged(chunkQKZL3ONM_cjs.canonicalJson(hashedProjection(definition)));
|
|
259
254
|
}
|
|
260
255
|
function sourceHash(files) {
|
|
261
256
|
const entries = [...files].sort(
|
|
262
257
|
(a, b) => a.path === b.path ? a.content < b.content ? -1 : a.content > b.content ? 1 : 0 : a.path < b.path ? -1 : 1
|
|
263
258
|
).map((file) => [file.path, file.content]);
|
|
264
|
-
return
|
|
259
|
+
return chunkQKZL3ONM_cjs.sha256Tagged(chunkQKZL3ONM_cjs.canonicalJson(entries));
|
|
265
260
|
}
|
|
266
261
|
function buildIdOf(bundle) {
|
|
267
|
-
return
|
|
262
|
+
return chunkQKZL3ONM_cjs.sha256Tagged(bundle);
|
|
268
263
|
}
|
|
269
264
|
|
|
270
265
|
exports.CODE_WORKFLOW_NODE_TYPE = CODE_WORKFLOW_NODE_TYPE;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkTBDXTV22_cjs = require('./chunk-TBDXTV22.cjs');
|
|
4
4
|
|
|
5
5
|
// src/builder/refs.ts
|
|
6
6
|
var REF_MODEL = /* @__PURE__ */ Symbol.for("fluidgrids.workflows.ref");
|
|
@@ -101,7 +101,7 @@ function callOnRef(model, args) {
|
|
|
101
101
|
}
|
|
102
102
|
function makeRef(root, path = []) {
|
|
103
103
|
const model = { root, path };
|
|
104
|
-
const render = () =>
|
|
104
|
+
const render = () => chunkTBDXTV22_cjs.formatRefTemplate(model);
|
|
105
105
|
const target = function fluidgridsRef() {
|
|
106
106
|
return void 0;
|
|
107
107
|
};
|
|
@@ -112,7 +112,7 @@ function makeRef(root, path = []) {
|
|
|
112
112
|
if (typeof property === "symbol") return void 0;
|
|
113
113
|
if (property === "then") return void 0;
|
|
114
114
|
if (property === "toJSON" || property === "toString" || property === "valueOf") return render;
|
|
115
|
-
return makeRef(root, [...path,
|
|
115
|
+
return makeRef(root, [...path, chunkTBDXTV22_cjs.segmentFromKey(property)]);
|
|
116
116
|
},
|
|
117
117
|
apply(_target, _thisArg, args) {
|
|
118
118
|
return callOnRef(model, args);
|
|
@@ -162,7 +162,7 @@ function expr(strings, ...values) {
|
|
|
162
162
|
let out = strings[0] ?? "";
|
|
163
163
|
values.forEach((value, index) => {
|
|
164
164
|
const model = refModelOf(value);
|
|
165
|
-
if (model) out +=
|
|
165
|
+
if (model) out += chunkTBDXTV22_cjs.formatRefTemplate(model);
|
|
166
166
|
else if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
|
167
167
|
out += String(value);
|
|
168
168
|
} else {
|