@fluidgrids/workflows 2026.1027.1 → 2026.1028.2
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 +144 -13
- 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-2J6TF7YI.cjs +86 -0
- package/dist/chunk-4LYSEANA.js +199 -0
- package/dist/chunk-623FVQSN.cjs +251 -0
- package/dist/{chunk-W32BSO3M.js → chunk-6FSHT5IL.js} +2 -2
- package/dist/{chunk-E3APHA6O.cjs → chunk-7AAZGVKD.js} +1 -64
- package/dist/chunk-ABFZWYHT.js +612 -0
- package/dist/{chunk-6U446SKY.js → chunk-BD7ZPG53.js} +2 -2
- package/dist/chunk-BO6OVILK.js +79 -0
- package/dist/chunk-C5OLWZ42.js +245 -0
- package/dist/{chunk-OSPTJCDI.cjs → chunk-CPDK3K5N.cjs} +6 -6
- package/dist/chunk-DHTLALBL.cjs +80 -0
- package/dist/chunk-DJYMDLV5.js +227 -0
- package/dist/{chunk-IHKXLG6I.js → chunk-E2VK7J2C.js} +1 -1
- package/dist/{chunk-3M34AUIY.cjs → chunk-FEW3JBYA.cjs} +3 -3
- package/dist/chunk-FMSW2HDF.cjs +267 -0
- package/dist/chunk-FR7KYWRO.cjs +41 -0
- package/dist/{chunk-7YR7DI7B.cjs → chunk-GBQ33SIZ.cjs} +44 -44
- package/dist/{chunk-6AIAC2FP.cjs → chunk-GVTZMA5C.cjs} +4 -4
- package/dist/{chunk-EEAIM35V.js → chunk-HWJZVOG7.js} +64 -23
- package/dist/chunk-I5LR3D2K.js +869 -0
- package/dist/chunk-IISBRUWJ.js +13 -0
- package/dist/chunk-JD2VQIDZ.cjs +15 -0
- package/dist/{chunk-UB2BHU2M.js → chunk-JZ4TOOLN.js} +1 -1
- package/dist/chunk-L24YIZY7.cjs +207 -0
- package/dist/chunk-LNUQE6D6.js +39 -0
- package/dist/chunk-M4BBAERY.cjs +1635 -0
- package/dist/chunk-N23SKIG4.js +73 -0
- package/dist/{chunk-TWOYB4Y7.cjs → chunk-NEIUQASE.cjs} +13 -13
- package/dist/chunk-P6TA5EZT.cjs +634 -0
- package/dist/chunk-PMCM2OH4.js +46 -0
- package/dist/chunk-PZCVF76Q.cjs +868 -0
- package/dist/{chunk-6BEW4QD6.js → chunk-QAN5MZEM.js} +1 -1
- package/dist/{chunk-CSYBNN3V.cjs → chunk-QKZL3ONM.cjs} +2 -2
- package/dist/chunk-QQ6ULXHI.cjs +885 -0
- package/dist/chunk-SAENRNBJ.cjs +52 -0
- package/dist/{chunk-TQF7MYEN.cjs → chunk-SAOBPYYJ.cjs} +134 -96
- package/dist/{chunk-XBIID5DY.js → chunk-SMCANK3F.js} +5 -4
- package/dist/{chunk-UWQWD7BP.cjs → chunk-SX2PNKKT.cjs} +18 -17
- package/dist/{chunk-UJNHTS6D.js → chunk-TBDXTV22.cjs} +8 -45
- package/dist/chunk-UK3WM7YZ.cjs +75 -0
- package/dist/chunk-VOKMAAJP.js +848 -0
- package/dist/chunk-VRHHBPT6.js +1622 -0
- package/dist/{chunk-5AW745OG.js → chunk-XHXIDVEC.js} +1 -1
- package/dist/chunk-XKJA7KX3.js +72 -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 +152 -158
- package/dist/ir/index.d.cts +14 -4
- package/dist/ir/index.d.ts +14 -4
- package/dist/ir/index.js +41 -50
- package/dist/lower-BzmUz0sq.d.cts +129 -0
- package/dist/lower-_-iT4HYs.d.ts +129 -0
- package/dist/lower-types-DQNBfWQn.d.cts +37 -0
- package/dist/lower-types-DQNBfWQn.d.ts +37 -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-4MSDKWOG.cjs +22 -0
- package/dist/node-evaluator-SX4LEYQC.js +12 -0
- package/dist/quickjs/index.cjs +236 -12
- package/dist/quickjs/index.d.cts +46 -5
- package/dist/quickjs/index.d.ts +46 -5
- package/dist/quickjs/index.js +230 -9
- package/dist/roundtrip/index.cjs +333 -131
- package/dist/roundtrip/index.d.cts +39 -7
- package/dist/roundtrip/index.d.ts +39 -7
- package/dist/roundtrip/index.js +185 -13
- 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-CrpUyd_3.d.ts → workflow-Bpr3vnA_.d.ts} +40 -160
- package/dist/workflow-C2a05WUJ.d.ts +444 -0
- package/dist/{assemble-DEf3znGD.d.cts → workflow-FXUkpIBc.d.cts} +40 -160
- 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 +44 -5
- 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-MBBKGD7K.js +0 -440
- package/dist/chunk-Y7NWR3WH.cjs +0 -450
- package/dist/lower-CXggJTIo.d.ts +0 -67
- package/dist/lower-DAzvsJCo.d.cts +0 -67
- package/dist/node-evaluator-CH3XCJND.cjs +0 -17
- package/dist/node-evaluator-TULXA3WE.js +0 -8
package/dist/ir/index.cjs
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunkNEIUQASE_cjs = require('../chunk-NEIUQASE.cjs');
|
|
4
|
+
var chunkCPDK3K5N_cjs = require('../chunk-CPDK3K5N.cjs');
|
|
5
|
+
var chunkGBQ33SIZ_cjs = require('../chunk-GBQ33SIZ.cjs');
|
|
6
6
|
var chunkG4UEPUGO_cjs = require('../chunk-G4UEPUGO.cjs');
|
|
7
|
-
var
|
|
8
|
-
var
|
|
7
|
+
var chunkQKZL3ONM_cjs = require('../chunk-QKZL3ONM.cjs');
|
|
8
|
+
var chunkTBDXTV22_cjs = require('../chunk-TBDXTV22.cjs');
|
|
9
|
+
var chunkSAENRNBJ_cjs = require('../chunk-SAENRNBJ.cjs');
|
|
10
|
+
var chunkFR7KYWRO_cjs = require('../chunk-FR7KYWRO.cjs');
|
|
11
|
+
require('../chunk-Z2Y65YOY.cjs');
|
|
9
12
|
var _2020_js = require('ajv/dist/2020.js');
|
|
10
13
|
var cronParser = require('cron-parser');
|
|
11
14
|
|
|
@@ -160,6 +163,8 @@ var IR_V2_SCHEMA = {
|
|
|
160
163
|
required: ["signalName"],
|
|
161
164
|
properties: {
|
|
162
165
|
signalName: { type: "string", minLength: 1 },
|
|
166
|
+
consume: { enum: ["first", "all"] },
|
|
167
|
+
limitWaitUntil: { type: "string", minLength: 1 },
|
|
163
168
|
limitWait: {
|
|
164
169
|
type: "object",
|
|
165
170
|
required: ["amount", "unit"],
|
|
@@ -169,7 +174,8 @@ var IR_V2_SCHEMA = {
|
|
|
169
174
|
}
|
|
170
175
|
},
|
|
171
176
|
payloadSchema: JSON_SCHEMA_OBJECT
|
|
172
|
-
}
|
|
177
|
+
},
|
|
178
|
+
not: { required: ["limitWait", "limitWaitUntil"] }
|
|
173
179
|
}
|
|
174
180
|
}
|
|
175
181
|
}
|
|
@@ -335,17 +341,17 @@ function stringOrEmpty(value) {
|
|
|
335
341
|
return typeof value === "string" && value ? value : "";
|
|
336
342
|
}
|
|
337
343
|
function executorNodeView(node) {
|
|
338
|
-
const record =
|
|
339
|
-
const data =
|
|
340
|
-
const args =
|
|
341
|
-
const dataArgs =
|
|
344
|
+
const record = chunkSAENRNBJ_cjs.isRecord(node) ? node : {};
|
|
345
|
+
const data = chunkSAENRNBJ_cjs.isRecord(record["data"]) ? record["data"] : void 0;
|
|
346
|
+
const args = chunkSAENRNBJ_cjs.isRecord(record["args"]) ? record["args"] : void 0;
|
|
347
|
+
const dataArgs = chunkSAENRNBJ_cjs.isRecord(data?.["args"]) ? data["args"] : void 0;
|
|
342
348
|
const type = typeof record["type"] === "string" ? record["type"] : "";
|
|
343
|
-
const merged =
|
|
349
|
+
const merged = chunkGBQ33SIZ_cjs.usesMergedParameters(type);
|
|
344
350
|
let parameters;
|
|
345
351
|
if (merged) {
|
|
346
|
-
const config =
|
|
347
|
-
const dataState2 =
|
|
348
|
-
const rootState =
|
|
352
|
+
const config = chunkSAENRNBJ_cjs.isRecord(record["config"]) ? record["config"] : {};
|
|
353
|
+
const dataState2 = chunkSAENRNBJ_cjs.isRecord(dataArgs?.["state"]) ? dataArgs["state"] : {};
|
|
354
|
+
const rootState = chunkSAENRNBJ_cjs.isRecord(args?.["state"]) ? args["state"] : {};
|
|
349
355
|
const all = { ...data, ...config, ...dataState2, ...rootState };
|
|
350
356
|
for (const key of UNREAD_INTERNAL_PARAMETER_KEYS) {
|
|
351
357
|
if (!Object.hasOwn(config, key) && !Object.hasOwn(dataState2, key) && !Object.hasOwn(rootState, key)) {
|
|
@@ -356,14 +362,14 @@ function executorNodeView(node) {
|
|
|
356
362
|
} else {
|
|
357
363
|
parameters = args?.["state"] || dataArgs?.["state"] || data?.["state"];
|
|
358
364
|
}
|
|
359
|
-
const rootSettings =
|
|
360
|
-
const dataSettings =
|
|
361
|
-
const dataState =
|
|
362
|
-
const nodeData =
|
|
363
|
-
const argsContext =
|
|
364
|
-
const contextNode =
|
|
365
|
+
const rootSettings = chunkSAENRNBJ_cjs.isRecord(record["executionSettings"]) ? record["executionSettings"] : void 0;
|
|
366
|
+
const dataSettings = chunkSAENRNBJ_cjs.isRecord(data?.["executionSettings"]) ? data["executionSettings"] : void 0;
|
|
367
|
+
const dataState = chunkSAENRNBJ_cjs.isRecord(dataArgs?.["state"]) ? dataArgs["state"] : void 0;
|
|
368
|
+
const nodeData = chunkSAENRNBJ_cjs.isRecord(data?.["nodeData"]) ? data["nodeData"] : void 0;
|
|
369
|
+
const argsContext = chunkSAENRNBJ_cjs.isRecord(args?.["context"]) ? args["context"] : void 0;
|
|
370
|
+
const contextNode = chunkSAENRNBJ_cjs.isRecord(argsContext?.["node"]) ? argsContext["node"] : void 0;
|
|
365
371
|
const subNodeState = merged ? void 0 : args?.["state"] || dataArgs?.["state"] || {};
|
|
366
|
-
const toolOperation = merged ? void 0 : (
|
|
372
|
+
const toolOperation = merged ? void 0 : (chunkSAENRNBJ_cjs.isRecord(subNodeState) ? subNodeState["operation"] : void 0) || data?.["operation_name"];
|
|
367
373
|
return {
|
|
368
374
|
id: record["id"],
|
|
369
375
|
type: record["type"],
|
|
@@ -386,50 +392,10 @@ function executorNodeView(node) {
|
|
|
386
392
|
};
|
|
387
393
|
}
|
|
388
394
|
function executorView(definition) {
|
|
389
|
-
if (!
|
|
395
|
+
if (!chunkSAENRNBJ_cjs.isRecord(definition) || !chunkSAENRNBJ_cjs.isRecord(definition["data"])) return [];
|
|
390
396
|
const nodes = definition["data"]["nodes"];
|
|
391
397
|
return Array.isArray(nodes) ? nodes.map(executorNodeView) : [];
|
|
392
398
|
}
|
|
393
|
-
|
|
394
|
-
// src/ir/duration.ts
|
|
395
|
-
var SHORT = /^(\d+(?:\.\d+)?)(ms|s|m|h|d|w)$/;
|
|
396
|
-
var ISO = /^P(?:(\d+(?:\.\d+)?)W)?(?:(\d+(?:\.\d+)?)D)?(?:T(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;
|
|
397
|
-
var SECOND_MS = 1e3;
|
|
398
|
-
var MINUTE_MS = 60 * SECOND_MS;
|
|
399
|
-
var HOUR_MS = 60 * MINUTE_MS;
|
|
400
|
-
var DAY_MS = 24 * HOUR_MS;
|
|
401
|
-
var WEEK_MS = 7 * DAY_MS;
|
|
402
|
-
var UNIT_MS = {
|
|
403
|
-
ms: 1,
|
|
404
|
-
s: SECOND_MS,
|
|
405
|
-
m: MINUTE_MS,
|
|
406
|
-
h: HOUR_MS,
|
|
407
|
-
d: DAY_MS,
|
|
408
|
-
w: WEEK_MS
|
|
409
|
-
};
|
|
410
|
-
function durationMs(value, numberUnit) {
|
|
411
|
-
if (typeof value === "number") {
|
|
412
|
-
if (!Number.isFinite(value) || value < 0) return void 0;
|
|
413
|
-
return numberUnit === "s" ? value * 1e3 : value;
|
|
414
|
-
}
|
|
415
|
-
if (typeof value !== "string") return void 0;
|
|
416
|
-
const text = value.trim();
|
|
417
|
-
const short = SHORT.exec(text);
|
|
418
|
-
if (short?.[1] !== void 0 && short[2] !== void 0) {
|
|
419
|
-
const unit = UNIT_MS[short[2]];
|
|
420
|
-
return unit === void 0 ? void 0 : Number(short[1]) * unit;
|
|
421
|
-
}
|
|
422
|
-
const iso = ISO.exec(text);
|
|
423
|
-
if (iso && text !== "P" && text !== "PT") {
|
|
424
|
-
const [, weeks, days, hours, minutes, seconds] = iso;
|
|
425
|
-
const parts = [weeks, days, hours, minutes, seconds];
|
|
426
|
-
if (parts.every((part) => part === void 0)) return void 0;
|
|
427
|
-
return Number(weeks ?? 0) * WEEK_MS + Number(days ?? 0) * DAY_MS + Number(hours ?? 0) * HOUR_MS + Number(minutes ?? 0) * MINUTE_MS + Number(seconds ?? 0) * SECOND_MS;
|
|
428
|
-
}
|
|
429
|
-
return void 0;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
// src/ir/schedule.ts
|
|
433
399
|
var FIRE_TIMES = 10;
|
|
434
400
|
var MAX_ITERATIONS = 2e4;
|
|
435
401
|
var CALENDAR_FIELDS = [
|
|
@@ -449,7 +415,7 @@ function rangeValues(value, min, max, field) {
|
|
|
449
415
|
values.push(entry);
|
|
450
416
|
continue;
|
|
451
417
|
}
|
|
452
|
-
if (!
|
|
418
|
+
if (!chunkSAENRNBJ_cjs.isRecord(entry) || typeof entry["start"] !== "number") {
|
|
453
419
|
throw new Error(`${field} entries must be numbers or { start, end, step }`);
|
|
454
420
|
}
|
|
455
421
|
const start = entry["start"];
|
|
@@ -499,7 +465,7 @@ function localParts(date, tz) {
|
|
|
499
465
|
function calendarTimes(entries, now, tz) {
|
|
500
466
|
const all = [];
|
|
501
467
|
for (const entry of entries) {
|
|
502
|
-
if (!
|
|
468
|
+
if (!chunkSAENRNBJ_cjs.isRecord(entry)) throw new Error("each calendar entry must be an object");
|
|
503
469
|
const expression = CALENDAR_FIELDS.map((field) => cronField(entry[field.name], field)).join(
|
|
504
470
|
" "
|
|
505
471
|
);
|
|
@@ -518,9 +484,9 @@ function calendarTimes(entries, now, tz) {
|
|
|
518
484
|
function intervalTimes(entries, now) {
|
|
519
485
|
const all = [];
|
|
520
486
|
for (const entry of entries) {
|
|
521
|
-
if (!
|
|
522
|
-
const every = durationMs(entry["every"], "s");
|
|
523
|
-
const offset = entry["offset"] === void 0 ? 0 : durationMs(entry["offset"], "s");
|
|
487
|
+
if (!chunkSAENRNBJ_cjs.isRecord(entry)) throw new Error("each interval entry must be an object");
|
|
488
|
+
const every = chunkFR7KYWRO_cjs.durationMs(entry["every"], "s");
|
|
489
|
+
const offset = entry["offset"] === void 0 ? 0 : chunkFR7KYWRO_cjs.durationMs(entry["offset"], "s");
|
|
524
490
|
if (every === void 0 || every <= 0)
|
|
525
491
|
throw new Error("interval.every must be a positive duration");
|
|
526
492
|
if (offset === void 0 || offset >= every)
|
|
@@ -533,7 +499,7 @@ function intervalTimes(entries, now) {
|
|
|
533
499
|
}
|
|
534
500
|
function checkScheduleSpec(spec, options = {}) {
|
|
535
501
|
const now = options.now ?? /* @__PURE__ */ new Date();
|
|
536
|
-
if (!
|
|
502
|
+
if (!chunkSAENRNBJ_cjs.isRecord(spec)) return { ok: false, problem: "spec must be an object", nextFireTimes: [] };
|
|
537
503
|
const kinds = ["cron", "calendar", "interval"].filter((kind) => spec[kind] !== void 0);
|
|
538
504
|
if (kinds.length !== 1) {
|
|
539
505
|
return {
|
|
@@ -586,7 +552,7 @@ function schemaTools() {
|
|
|
586
552
|
return compiled;
|
|
587
553
|
}
|
|
588
554
|
function isValidJsonSchema(schema) {
|
|
589
|
-
if (!
|
|
555
|
+
if (!chunkSAENRNBJ_cjs.isRecord(schema) && typeof schema !== "boolean") return false;
|
|
590
556
|
const { ajv } = schemaTools();
|
|
591
557
|
return ajv.validateSchema(schema) === true;
|
|
592
558
|
}
|
|
@@ -598,7 +564,7 @@ function findSecretKeys(value, path, parentKey, out) {
|
|
|
598
564
|
value.forEach((item, index) => findSecretKeys(item, `${path}[${index}]`, parentKey, out));
|
|
599
565
|
return;
|
|
600
566
|
}
|
|
601
|
-
if (!
|
|
567
|
+
if (!chunkSAENRNBJ_cjs.isRecord(value)) return;
|
|
602
568
|
for (const [key, child] of Object.entries(value)) {
|
|
603
569
|
if (isSecretKey(parentKey, key)) out.push(`${path}.${key}`);
|
|
604
570
|
findSecretKeys(child, `${path}.${key}`, key, out);
|
|
@@ -606,14 +572,14 @@ function findSecretKeys(value, path, parentKey, out) {
|
|
|
606
572
|
}
|
|
607
573
|
function findLegacyTemplates(value, path, out) {
|
|
608
574
|
if (typeof value === "string") {
|
|
609
|
-
if (
|
|
575
|
+
if (chunkTBDXTV22_cjs.hasLegacyTemplate(value)) out.push(path);
|
|
610
576
|
return;
|
|
611
577
|
}
|
|
612
578
|
if (Array.isArray(value)) {
|
|
613
579
|
value.forEach((item, index) => findLegacyTemplates(item, `${path}[${index}]`, out));
|
|
614
580
|
return;
|
|
615
581
|
}
|
|
616
|
-
if (
|
|
582
|
+
if (chunkSAENRNBJ_cjs.isRecord(value)) {
|
|
617
583
|
for (const [key, child] of Object.entries(value))
|
|
618
584
|
findLegacyTemplates(child, `${path}.${key}`, out);
|
|
619
585
|
}
|
|
@@ -639,31 +605,31 @@ function isHardSchemaError(error) {
|
|
|
639
605
|
function legacyMirrors(node) {
|
|
640
606
|
const found = [];
|
|
641
607
|
const type = typeof node["type"] === "string" ? node["type"] : "";
|
|
642
|
-
const merged =
|
|
643
|
-
const data =
|
|
644
|
-
const dataArgs =
|
|
608
|
+
const merged = chunkGBQ33SIZ_cjs.usesMergedParameters(type);
|
|
609
|
+
const data = chunkSAENRNBJ_cjs.isRecord(node["data"]) ? node["data"] : void 0;
|
|
610
|
+
const dataArgs = chunkSAENRNBJ_cjs.isRecord(data?.["args"]) ? data["args"] : void 0;
|
|
645
611
|
if (data) {
|
|
646
612
|
for (const key of ["label", "errorConfig", "disabled", "state", "nodeVersion"]) {
|
|
647
613
|
if (data[key] !== void 0) found.push(`data.${key}`);
|
|
648
614
|
}
|
|
649
|
-
if (data["operation_name"] !== void 0 && !
|
|
615
|
+
if (data["operation_name"] !== void 0 && !chunkSAENRNBJ_cjs.deepEqual(data["operation_name"], node["operation_name"]))
|
|
650
616
|
found.push("data.operation_name");
|
|
651
|
-
if (!merged && data["version"] !== void 0 && !
|
|
617
|
+
if (!merged && data["version"] !== void 0 && !chunkSAENRNBJ_cjs.deepEqual(data["version"], node["version"]))
|
|
652
618
|
found.push("data.version");
|
|
653
619
|
for (const key of ["state", "connections", "credentials", "context"]) {
|
|
654
620
|
if (dataArgs?.[key] !== void 0) found.push(`data.args.${key}`);
|
|
655
621
|
}
|
|
656
|
-
const settings2 =
|
|
622
|
+
const settings2 = chunkSAENRNBJ_cjs.isRecord(data["executionSettings"]) ? data["executionSettings"] : void 0;
|
|
657
623
|
if (settings2) {
|
|
658
|
-
const onlyRunOnMirror = Object.keys(settings2).length === 1 && settings2["runOn"] !== void 0 &&
|
|
624
|
+
const onlyRunOnMirror = Object.keys(settings2).length === 1 && settings2["runOn"] !== void 0 && chunkSAENRNBJ_cjs.isRecord(node["executionSettings"]) && JSON.stringify(node["executionSettings"]["runOn"]) === JSON.stringify(settings2["runOn"]);
|
|
659
625
|
if (!onlyRunOnMirror) found.push("data.executionSettings");
|
|
660
626
|
}
|
|
661
627
|
}
|
|
662
628
|
if (merged && node["config"] !== void 0) found.push("config");
|
|
663
|
-
const args =
|
|
629
|
+
const args = chunkSAENRNBJ_cjs.isRecord(node["args"]) ? node["args"] : void 0;
|
|
664
630
|
if (args?.["credentials"] !== void 0) found.push("args.credentials");
|
|
665
|
-
const settings =
|
|
666
|
-
if (settings?.["runOn"] !== void 0 && !
|
|
631
|
+
const settings = chunkSAENRNBJ_cjs.isRecord(node["executionSettings"]) ? node["executionSettings"] : void 0;
|
|
632
|
+
if (settings?.["runOn"] !== void 0 && !chunkSAENRNBJ_cjs.isRecord(data?.["executionSettings"]))
|
|
667
633
|
found.push("executionSettings.runOn");
|
|
668
634
|
return found;
|
|
669
635
|
}
|
|
@@ -678,7 +644,7 @@ function validate(definition, options = {}) {
|
|
|
678
644
|
const warnOrFail = (issue) => {
|
|
679
645
|
(strict ? errors : warnings).push(issue);
|
|
680
646
|
};
|
|
681
|
-
if (!
|
|
647
|
+
if (!chunkSAENRNBJ_cjs.isRecord(definition)) {
|
|
682
648
|
return {
|
|
683
649
|
valid: false,
|
|
684
650
|
errors: [{ code: "definition.required", message: "A workflow definition must be an object" }],
|
|
@@ -686,7 +652,7 @@ function validate(definition, options = {}) {
|
|
|
686
652
|
taskQueues: []
|
|
687
653
|
};
|
|
688
654
|
}
|
|
689
|
-
const data =
|
|
655
|
+
const data = chunkSAENRNBJ_cjs.isRecord(definition["data"]) ? definition["data"] : void 0;
|
|
690
656
|
if (!data)
|
|
691
657
|
fail({ code: "definition.dataRequired", message: "The definition needs a data object" });
|
|
692
658
|
const rawNodes = data?.["nodes"];
|
|
@@ -716,8 +682,8 @@ function validate(definition, options = {}) {
|
|
|
716
682
|
else warnOrFail(issue);
|
|
717
683
|
}
|
|
718
684
|
}
|
|
719
|
-
const nodes = rawNodes.map((node) =>
|
|
720
|
-
const edges = rawEdges.map((edge) =>
|
|
685
|
+
const nodes = rawNodes.map((node) => chunkSAENRNBJ_cjs.isRecord(node) ? node : {});
|
|
686
|
+
const edges = rawEdges.map((edge) => chunkSAENRNBJ_cjs.isRecord(edge) ? edge : {});
|
|
721
687
|
if (nodes.length === 0 && !options.allowEmpty)
|
|
722
688
|
fail({ code: "node.atLeastOne", message: "Add at least one node" });
|
|
723
689
|
const ids = /* @__PURE__ */ new Set();
|
|
@@ -764,10 +730,10 @@ function validate(definition, options = {}) {
|
|
|
764
730
|
pairs.add(pair);
|
|
765
731
|
if (target) incoming.set(target, (incoming.get(target) ?? 0) + 1);
|
|
766
732
|
});
|
|
767
|
-
const code =
|
|
768
|
-
const exportsBlock =
|
|
769
|
-
const workflowExports =
|
|
770
|
-
const activityExports =
|
|
733
|
+
const code = chunkSAENRNBJ_cjs.isRecord(definition["code"]) ? definition["code"] : void 0;
|
|
734
|
+
const exportsBlock = chunkSAENRNBJ_cjs.isRecord(code?.["exports"]) ? code["exports"] : void 0;
|
|
735
|
+
const workflowExports = chunkSAENRNBJ_cjs.isRecord(exportsBlock?.["workflows"]) ? exportsBlock["workflows"] : {};
|
|
736
|
+
const activityExports = chunkSAENRNBJ_cjs.isRecord(exportsBlock?.["activities"]) ? exportsBlock["activities"] : {};
|
|
771
737
|
if (code?.["determinism"] === "isolate" && Object.keys(activityExports).length > 0) {
|
|
772
738
|
fail({
|
|
773
739
|
code: "code.isolateActivities",
|
|
@@ -779,13 +745,13 @@ function validate(definition, options = {}) {
|
|
|
779
745
|
...Object.entries(workflowExports),
|
|
780
746
|
...Object.entries(activityExports)
|
|
781
747
|
]) {
|
|
782
|
-
if (
|
|
748
|
+
if (chunkSAENRNBJ_cjs.isRecord(exported) && typeof exported["taskQueue"] === "string")
|
|
783
749
|
taskQueues.add(exported["taskQueue"]);
|
|
784
|
-
if (
|
|
750
|
+
if (chunkSAENRNBJ_cjs.isRecord(exported) && chunkSAENRNBJ_cjs.isRecord(exported["interface"])) {
|
|
785
751
|
checkInterface(exported["interface"], `code.exports.*.${name}.interface`, fail);
|
|
786
752
|
}
|
|
787
753
|
}
|
|
788
|
-
if (
|
|
754
|
+
if (chunkSAENRNBJ_cjs.isRecord(definition["interface"])) checkInterface(definition["interface"], "interface", fail);
|
|
789
755
|
for (const block of ["code", "interface"]) {
|
|
790
756
|
const found = [];
|
|
791
757
|
findSecretKeys(definition[block], block, void 0, found);
|
|
@@ -801,9 +767,9 @@ function validate(definition, options = {}) {
|
|
|
801
767
|
const id = typeof node["id"] === "string" ? node["id"] : void 0;
|
|
802
768
|
const at = id ? { nodeId: id } : {};
|
|
803
769
|
const type = typeof node["type"] === "string" ? node["type"] : "";
|
|
804
|
-
const args =
|
|
805
|
-
const state =
|
|
806
|
-
if (type ===
|
|
770
|
+
const args = chunkSAENRNBJ_cjs.isRecord(node["args"]) ? node["args"] : void 0;
|
|
771
|
+
const state = chunkSAENRNBJ_cjs.isRecord(args?.["state"]) ? args["state"] : void 0;
|
|
772
|
+
if (type === chunkGBQ33SIZ_cjs.CODE_WORKFLOW_NODE_TYPE) {
|
|
807
773
|
const workflowFn = state?.["workflowFn"];
|
|
808
774
|
if (!code) {
|
|
809
775
|
fail({
|
|
@@ -820,10 +786,35 @@ function validate(definition, options = {}) {
|
|
|
820
786
|
});
|
|
821
787
|
}
|
|
822
788
|
if (typeof state?.["taskQueue"] === "string") taskQueues.add(state["taskQueue"]);
|
|
789
|
+
const policy = state?.["parentClosePolicy"];
|
|
790
|
+
if (state?.["waitForCompletion"] === false && (policy === "TERMINATE" || policy === "REQUEST_CANCEL"))
|
|
791
|
+
warnings.push({
|
|
792
|
+
code: "codeWorkflow.closePolicyEndsChild",
|
|
793
|
+
message: `waitForCompletion is false but parentClosePolicy is ${policy}: the child is stopped when the parent run ends; use ABANDON (the default) to let it outlive the parent`,
|
|
794
|
+
...at,
|
|
795
|
+
path: "args.state.parentClosePolicy"
|
|
796
|
+
});
|
|
797
|
+
if (state?.["waitForCompletion"] === false && typeof state["timeout"] === "number" && state["timeout"] > 0)
|
|
798
|
+
warnings.push({
|
|
799
|
+
code: "codeWorkflow.timeoutIgnored",
|
|
800
|
+
message: "timeout applies only while the node waits for the child; it has no effect when waitForCompletion is false",
|
|
801
|
+
...at,
|
|
802
|
+
path: "args.state.timeout"
|
|
803
|
+
});
|
|
823
804
|
}
|
|
824
|
-
|
|
805
|
+
if (type === chunkGBQ33SIZ_cjs.WAIT_FOR_SIGNAL_NODE_TYPE) {
|
|
806
|
+
const until = state?.["limitWaitUntil"];
|
|
807
|
+
if (until !== void 0 && (typeof until !== "string" || Number.isNaN(Date.parse(until))))
|
|
808
|
+
fail({
|
|
809
|
+
code: "waitForSignal.invalidDeadline",
|
|
810
|
+
message: "limitWaitUntil must be an ISO 8601 date-time",
|
|
811
|
+
...at,
|
|
812
|
+
path: "args.state.limitWaitUntil"
|
|
813
|
+
});
|
|
814
|
+
}
|
|
815
|
+
const isTrigger = chunkGBQ33SIZ_cjs.INTERNAL_TRIGGER_TYPES.has(type) || id !== void 0 && (incoming.get(id) ?? 0) === 0;
|
|
825
816
|
if (isTrigger && state?.["startDelay"] !== void 0) {
|
|
826
|
-
const delay = durationMs(state["startDelay"], "s");
|
|
817
|
+
const delay = chunkFR7KYWRO_cjs.durationMs(state["startDelay"], "s");
|
|
827
818
|
if (delay === void 0) {
|
|
828
819
|
fail({
|
|
829
820
|
code: "trigger.invalidDuration",
|
|
@@ -871,8 +862,8 @@ function validate(definition, options = {}) {
|
|
|
871
862
|
});
|
|
872
863
|
}
|
|
873
864
|
const templates = [];
|
|
874
|
-
const args2 =
|
|
875
|
-
const scanned = type === "internal:code" && args2 &&
|
|
865
|
+
const args2 = chunkSAENRNBJ_cjs.isRecord(node["args"]) ? node["args"] : void 0;
|
|
866
|
+
const scanned = type === "internal:code" && args2 && chunkSAENRNBJ_cjs.isRecord(args2["state"]) ? {
|
|
876
867
|
...args2,
|
|
877
868
|
state: Object.fromEntries(
|
|
878
869
|
Object.entries(args2["state"]).filter(([key]) => key !== "code")
|
|
@@ -904,11 +895,11 @@ function validate(definition, options = {}) {
|
|
|
904
895
|
}
|
|
905
896
|
});
|
|
906
897
|
}
|
|
907
|
-
const config =
|
|
898
|
+
const config = chunkSAENRNBJ_cjs.isRecord(definition["config"]) ? definition["config"] : void 0;
|
|
908
899
|
if (config) {
|
|
909
|
-
const timeout = config["timeout"] === void 0 ? void 0 : durationMs(config["timeout"], "s");
|
|
900
|
+
const timeout = config["timeout"] === void 0 ? void 0 : chunkFR7KYWRO_cjs.durationMs(config["timeout"], "s");
|
|
910
901
|
for (const key of ["executionTimeout", "workflowTaskTimeout"]) {
|
|
911
|
-
if (config[key] !== void 0 && durationMs(config[key], "s") === void 0) {
|
|
902
|
+
if (config[key] !== void 0 && chunkFR7KYWRO_cjs.durationMs(config[key], "s") === void 0) {
|
|
912
903
|
fail({
|
|
913
904
|
code: "config.invalidDuration",
|
|
914
905
|
message: `config.${key} is not a duration`,
|
|
@@ -916,7 +907,7 @@ function validate(definition, options = {}) {
|
|
|
916
907
|
});
|
|
917
908
|
}
|
|
918
909
|
}
|
|
919
|
-
const executionTimeout = config["executionTimeout"] === void 0 ? void 0 : durationMs(config["executionTimeout"], "s");
|
|
910
|
+
const executionTimeout = config["executionTimeout"] === void 0 ? void 0 : chunkFR7KYWRO_cjs.durationMs(config["executionTimeout"], "s");
|
|
920
911
|
if (executionTimeout !== void 0 && timeout !== void 0 && executionTimeout < timeout) {
|
|
921
912
|
fail({
|
|
922
913
|
code: "config.executionTimeoutBelowTimeout",
|
|
@@ -924,7 +915,7 @@ function validate(definition, options = {}) {
|
|
|
924
915
|
path: "config.executionTimeout"
|
|
925
916
|
});
|
|
926
917
|
}
|
|
927
|
-
const taskTimeout = config["workflowTaskTimeout"] === void 0 ? void 0 : durationMs(config["workflowTaskTimeout"], "s");
|
|
918
|
+
const taskTimeout = config["workflowTaskTimeout"] === void 0 ? void 0 : chunkFR7KYWRO_cjs.durationMs(config["workflowTaskTimeout"], "s");
|
|
928
919
|
if (taskTimeout !== void 0 && taskTimeout > MAX_WORKFLOW_TASK_TIMEOUT_MS) {
|
|
929
920
|
fail({
|
|
930
921
|
code: "config.workflowTaskTimeoutTooLong",
|
|
@@ -951,9 +942,9 @@ function checkInterface(block, path, fail) {
|
|
|
951
942
|
if (block["input"] !== void 0) schemas.push([`${path}.input`, block["input"]]);
|
|
952
943
|
if (block["output"] !== void 0) schemas.push([`${path}.output`, block["output"]]);
|
|
953
944
|
for (const group of ["signals", "queries", "updates"]) {
|
|
954
|
-
const members =
|
|
945
|
+
const members = chunkSAENRNBJ_cjs.isRecord(block[group]) ? block[group] : {};
|
|
955
946
|
for (const [name, member] of Object.entries(members)) {
|
|
956
|
-
if (!
|
|
947
|
+
if (!chunkSAENRNBJ_cjs.isRecord(member)) continue;
|
|
957
948
|
for (const part of ["payload", "args", "result"]) {
|
|
958
949
|
if (member[part] !== void 0)
|
|
959
950
|
schemas.push([`${path}.${group}.${name}.${part}`, member[part]]);
|
|
@@ -973,15 +964,15 @@ function checkInterface(block, path, fail) {
|
|
|
973
964
|
function shadowedInputs(nodes) {
|
|
974
965
|
const warnings = [];
|
|
975
966
|
for (const node of nodes) {
|
|
976
|
-
const data =
|
|
977
|
-
const declared =
|
|
967
|
+
const data = chunkSAENRNBJ_cjs.isRecord(node["data"]) ? node["data"] : void 0;
|
|
968
|
+
const declared = chunkSAENRNBJ_cjs.isRecord(data?.["inputs"]) ? data["inputs"] : void 0;
|
|
978
969
|
if (!declared) continue;
|
|
979
|
-
const dataArgs =
|
|
980
|
-
const args =
|
|
970
|
+
const dataArgs = chunkSAENRNBJ_cjs.isRecord(data?.["args"]) ? data["args"] : void 0;
|
|
971
|
+
const args = chunkSAENRNBJ_cjs.isRecord(node["args"]) ? node["args"] : void 0;
|
|
981
972
|
const staticParams = {
|
|
982
|
-
...
|
|
983
|
-
...
|
|
984
|
-
...
|
|
973
|
+
...chunkSAENRNBJ_cjs.isRecord(node["config"]) ? node["config"] : {},
|
|
974
|
+
...chunkSAENRNBJ_cjs.isRecord(dataArgs?.["state"]) ? dataArgs["state"] : {},
|
|
975
|
+
...chunkSAENRNBJ_cjs.isRecord(args?.["state"]) ? args["state"] : {}
|
|
985
976
|
};
|
|
986
977
|
for (const key of Object.keys(declared)) {
|
|
987
978
|
if (!Object.hasOwn(staticParams, key)) continue;
|
|
@@ -999,26 +990,26 @@ function shadowedInputs(nodes) {
|
|
|
999
990
|
var WORKFLOW_DOCUMENT_FORMAT = "fluidgrids.workflow";
|
|
1000
991
|
var V2_CONFIG_KEYS = ["executionTimeout", "workflowTaskTimeout", "versioningBehavior"];
|
|
1001
992
|
function isV2Definition(definition) {
|
|
1002
|
-
if (!
|
|
993
|
+
if (!chunkSAENRNBJ_cjs.isRecord(definition)) return false;
|
|
1003
994
|
if (definition["schemaVersion"] === 2) return true;
|
|
1004
995
|
for (const key of ["interface", "code", "authoring"]) {
|
|
1005
996
|
if (definition[key] !== void 0) return true;
|
|
1006
997
|
}
|
|
1007
998
|
const meta = definition["meta"];
|
|
1008
|
-
if (
|
|
999
|
+
if (chunkSAENRNBJ_cjs.isRecord(meta) && meta["layout"] !== void 0) return true;
|
|
1009
1000
|
const config = definition["config"];
|
|
1010
|
-
if (
|
|
1001
|
+
if (chunkSAENRNBJ_cjs.isRecord(config) && V2_CONFIG_KEYS.some((key) => config[key] !== void 0)) return true;
|
|
1011
1002
|
const data = definition["data"];
|
|
1012
|
-
const nodes =
|
|
1003
|
+
const nodes = chunkSAENRNBJ_cjs.isRecord(data) && Array.isArray(data["nodes"]) ? data["nodes"] : [];
|
|
1013
1004
|
return nodes.some(
|
|
1014
|
-
(node) =>
|
|
1005
|
+
(node) => chunkSAENRNBJ_cjs.isRecord(node) && typeof node["type"] === "string" && chunkGBQ33SIZ_cjs.V2_NODE_TYPES.has(node["type"])
|
|
1015
1006
|
);
|
|
1016
1007
|
}
|
|
1017
1008
|
function envelopeSchemaVersion(definition) {
|
|
1018
1009
|
return isV2Definition(definition) ? 2 : 1;
|
|
1019
1010
|
}
|
|
1020
1011
|
function exportDefinition(definition) {
|
|
1021
|
-
return isV2Definition(definition) ?
|
|
1012
|
+
return isV2Definition(definition) ? chunkGBQ33SIZ_cjs.normalizeDefinition(definition) : definition;
|
|
1022
1013
|
}
|
|
1023
1014
|
function buildExportDocument(input) {
|
|
1024
1015
|
return {
|
|
@@ -1043,10 +1034,10 @@ function serializeWorkflowDocument(document, versionCreatedAt) {
|
|
|
1043
1034
|
`;
|
|
1044
1035
|
}
|
|
1045
1036
|
function readWorkflowDocument(value) {
|
|
1046
|
-
if (!
|
|
1037
|
+
if (!chunkSAENRNBJ_cjs.isRecord(value)) return null;
|
|
1047
1038
|
if (value["format"] === WORKFLOW_DOCUMENT_FORMAT || "definitionJson" in value) {
|
|
1048
1039
|
const definitionJson = value["definitionJson"];
|
|
1049
|
-
if (!
|
|
1040
|
+
if (!chunkSAENRNBJ_cjs.isRecord(definitionJson)) return null;
|
|
1050
1041
|
const schemaVersion = value["schemaVersion"];
|
|
1051
1042
|
return {
|
|
1052
1043
|
definitionJson,
|
|
@@ -1077,7 +1068,7 @@ function workflowInputsSchema(workflowInputs) {
|
|
|
1077
1068
|
const name = (rawName ?? "").trim();
|
|
1078
1069
|
if (!name) continue;
|
|
1079
1070
|
const type = (rawType ?? "").trim().toLowerCase();
|
|
1080
|
-
|
|
1071
|
+
chunkSAENRNBJ_cjs.setOwn(properties, name, FIELD_TYPES.has(type) ? { type } : {});
|
|
1081
1072
|
required.push(name);
|
|
1082
1073
|
}
|
|
1083
1074
|
return {
|
|
@@ -1088,15 +1079,15 @@ function workflowInputsSchema(workflowInputs) {
|
|
|
1088
1079
|
};
|
|
1089
1080
|
}
|
|
1090
1081
|
function deriveInterface(definition, options = {}) {
|
|
1091
|
-
if (!
|
|
1092
|
-
if (
|
|
1093
|
-
const data =
|
|
1094
|
-
const nodes = Array.isArray(data["nodes"]) ? data["nodes"].filter(
|
|
1095
|
-
const edges = Array.isArray(data["edges"]) ? data["edges"].filter(
|
|
1082
|
+
if (!chunkSAENRNBJ_cjs.isRecord(definition)) return {};
|
|
1083
|
+
if (chunkSAENRNBJ_cjs.isRecord(definition["interface"])) return definition["interface"];
|
|
1084
|
+
const data = chunkSAENRNBJ_cjs.isRecord(definition["data"]) ? definition["data"] : {};
|
|
1085
|
+
const nodes = Array.isArray(data["nodes"]) ? data["nodes"].filter(chunkSAENRNBJ_cjs.isRecord) : [];
|
|
1086
|
+
const edges = Array.isArray(data["edges"]) ? data["edges"].filter(chunkSAENRNBJ_cjs.isRecord) : [];
|
|
1096
1087
|
const derived = {};
|
|
1097
1088
|
const call = nodes.find((node) => node["type"] === "internal:workflow-call");
|
|
1098
|
-
const callArgs =
|
|
1099
|
-
const callState =
|
|
1089
|
+
const callArgs = chunkSAENRNBJ_cjs.isRecord(call?.["args"]) ? call["args"] : void 0;
|
|
1090
|
+
const callState = chunkSAENRNBJ_cjs.isRecord(callArgs?.["state"]) ? callArgs["state"] : void 0;
|
|
1100
1091
|
if (callState?.["inputSource"] === "fields" && typeof callState["workflowInputs"] === "string") {
|
|
1101
1092
|
derived.input = workflowInputsSchema(callState["workflowInputs"]);
|
|
1102
1093
|
}
|
|
@@ -1104,14 +1095,14 @@ function deriveInterface(definition, options = {}) {
|
|
|
1104
1095
|
const terminals = nodes.filter((node) => !sources.has(node["id"]));
|
|
1105
1096
|
const terminal = terminals.length === 1 ? terminals[0] : void 0;
|
|
1106
1097
|
if (terminal && options.manifests && typeof terminal["type"] === "string") {
|
|
1107
|
-
const manifest =
|
|
1098
|
+
const manifest = chunkCPDK3K5N_cjs.findManifest(options.manifests, terminal["type"]);
|
|
1108
1099
|
const operationName = typeof terminal["operation_name"] === "string" ? terminal["operation_name"] : void 0;
|
|
1109
|
-
const operations = manifest ?
|
|
1100
|
+
const operations = manifest ? chunkCPDK3K5N_cjs.operationsOf(manifest) : [];
|
|
1110
1101
|
const operation = operationName ? operations.find((candidate) => candidate.name === operationName) : operations[0];
|
|
1111
1102
|
if (operation?.output_fields) {
|
|
1112
1103
|
derived.output = {
|
|
1113
1104
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
1114
|
-
...
|
|
1105
|
+
...chunkCPDK3K5N_cjs.fieldsSchema(operation.output_fields)
|
|
1115
1106
|
};
|
|
1116
1107
|
}
|
|
1117
1108
|
}
|
|
@@ -1120,63 +1111,63 @@ function deriveInterface(definition, options = {}) {
|
|
|
1120
1111
|
|
|
1121
1112
|
Object.defineProperty(exports, "diffDefinitions", {
|
|
1122
1113
|
enumerable: true,
|
|
1123
|
-
get: function () { return
|
|
1114
|
+
get: function () { return chunkNEIUQASE_cjs.diffDefinitions; }
|
|
1124
1115
|
});
|
|
1125
1116
|
Object.defineProperty(exports, "fieldSchema", {
|
|
1126
1117
|
enumerable: true,
|
|
1127
|
-
get: function () { return
|
|
1118
|
+
get: function () { return chunkCPDK3K5N_cjs.fieldSchema; }
|
|
1128
1119
|
});
|
|
1129
1120
|
Object.defineProperty(exports, "fieldsSchema", {
|
|
1130
1121
|
enumerable: true,
|
|
1131
|
-
get: function () { return
|
|
1122
|
+
get: function () { return chunkCPDK3K5N_cjs.fieldsSchema; }
|
|
1132
1123
|
});
|
|
1133
1124
|
Object.defineProperty(exports, "findManifest", {
|
|
1134
1125
|
enumerable: true,
|
|
1135
|
-
get: function () { return
|
|
1126
|
+
get: function () { return chunkCPDK3K5N_cjs.findManifest; }
|
|
1136
1127
|
});
|
|
1137
1128
|
Object.defineProperty(exports, "isTriggerOperation", {
|
|
1138
1129
|
enumerable: true,
|
|
1139
|
-
get: function () { return
|
|
1130
|
+
get: function () { return chunkCPDK3K5N_cjs.isTriggerOperation; }
|
|
1140
1131
|
});
|
|
1141
1132
|
Object.defineProperty(exports, "operationsOf", {
|
|
1142
1133
|
enumerable: true,
|
|
1143
|
-
get: function () { return
|
|
1134
|
+
get: function () { return chunkCPDK3K5N_cjs.operationsOf; }
|
|
1144
1135
|
});
|
|
1145
1136
|
Object.defineProperty(exports, "CODE_WORKFLOW_NODE_TYPE", {
|
|
1146
1137
|
enumerable: true,
|
|
1147
|
-
get: function () { return
|
|
1138
|
+
get: function () { return chunkGBQ33SIZ_cjs.CODE_WORKFLOW_NODE_TYPE; }
|
|
1148
1139
|
});
|
|
1149
1140
|
Object.defineProperty(exports, "INTERNAL_TRIGGER_TYPES", {
|
|
1150
1141
|
enumerable: true,
|
|
1151
|
-
get: function () { return
|
|
1142
|
+
get: function () { return chunkGBQ33SIZ_cjs.INTERNAL_TRIGGER_TYPES; }
|
|
1152
1143
|
});
|
|
1153
1144
|
Object.defineProperty(exports, "WAIT_FOR_SIGNAL_NODE_TYPE", {
|
|
1154
1145
|
enumerable: true,
|
|
1155
|
-
get: function () { return
|
|
1146
|
+
get: function () { return chunkGBQ33SIZ_cjs.WAIT_FOR_SIGNAL_NODE_TYPE; }
|
|
1156
1147
|
});
|
|
1157
1148
|
Object.defineProperty(exports, "buildIdOf", {
|
|
1158
1149
|
enumerable: true,
|
|
1159
|
-
get: function () { return
|
|
1150
|
+
get: function () { return chunkGBQ33SIZ_cjs.buildIdOf; }
|
|
1160
1151
|
});
|
|
1161
1152
|
Object.defineProperty(exports, "hashedProjection", {
|
|
1162
1153
|
enumerable: true,
|
|
1163
|
-
get: function () { return
|
|
1154
|
+
get: function () { return chunkGBQ33SIZ_cjs.hashedProjection; }
|
|
1164
1155
|
});
|
|
1165
1156
|
Object.defineProperty(exports, "irHash", {
|
|
1166
1157
|
enumerable: true,
|
|
1167
|
-
get: function () { return
|
|
1158
|
+
get: function () { return chunkGBQ33SIZ_cjs.irHash; }
|
|
1168
1159
|
});
|
|
1169
1160
|
Object.defineProperty(exports, "normalizeDefinition", {
|
|
1170
1161
|
enumerable: true,
|
|
1171
|
-
get: function () { return
|
|
1162
|
+
get: function () { return chunkGBQ33SIZ_cjs.normalizeDefinition; }
|
|
1172
1163
|
});
|
|
1173
1164
|
Object.defineProperty(exports, "sourceHash", {
|
|
1174
1165
|
enumerable: true,
|
|
1175
|
-
get: function () { return
|
|
1166
|
+
get: function () { return chunkGBQ33SIZ_cjs.sourceHash; }
|
|
1176
1167
|
});
|
|
1177
1168
|
Object.defineProperty(exports, "usesMergedParameters", {
|
|
1178
1169
|
enumerable: true,
|
|
1179
|
-
get: function () { return
|
|
1170
|
+
get: function () { return chunkGBQ33SIZ_cjs.usesMergedParameters; }
|
|
1180
1171
|
});
|
|
1181
1172
|
Object.defineProperty(exports, "LAYOUT_COLUMN_WIDTH", {
|
|
1182
1173
|
enumerable: true,
|
|
@@ -1192,39 +1183,43 @@ Object.defineProperty(exports, "autoLayout", {
|
|
|
1192
1183
|
});
|
|
1193
1184
|
Object.defineProperty(exports, "CanonicalJsonError", {
|
|
1194
1185
|
enumerable: true,
|
|
1195
|
-
get: function () { return
|
|
1186
|
+
get: function () { return chunkQKZL3ONM_cjs.CanonicalJsonError; }
|
|
1196
1187
|
});
|
|
1197
1188
|
Object.defineProperty(exports, "canonicalJson", {
|
|
1198
1189
|
enumerable: true,
|
|
1199
|
-
get: function () { return
|
|
1190
|
+
get: function () { return chunkQKZL3ONM_cjs.canonicalJson; }
|
|
1200
1191
|
});
|
|
1201
1192
|
Object.defineProperty(exports, "sha256Hex", {
|
|
1202
1193
|
enumerable: true,
|
|
1203
|
-
get: function () { return
|
|
1194
|
+
get: function () { return chunkQKZL3ONM_cjs.sha256Hex; }
|
|
1204
1195
|
});
|
|
1205
1196
|
Object.defineProperty(exports, "sha256Tagged", {
|
|
1206
1197
|
enumerable: true,
|
|
1207
|
-
get: function () { return
|
|
1198
|
+
get: function () { return chunkQKZL3ONM_cjs.sha256Tagged; }
|
|
1208
1199
|
});
|
|
1209
1200
|
Object.defineProperty(exports, "stableStringify", {
|
|
1210
1201
|
enumerable: true,
|
|
1211
|
-
get: function () { return
|
|
1202
|
+
get: function () { return chunkQKZL3ONM_cjs.stableStringify; }
|
|
1212
1203
|
});
|
|
1213
1204
|
Object.defineProperty(exports, "formatRefExpression", {
|
|
1214
1205
|
enumerable: true,
|
|
1215
|
-
get: function () { return
|
|
1206
|
+
get: function () { return chunkTBDXTV22_cjs.formatRefExpression; }
|
|
1216
1207
|
});
|
|
1217
1208
|
Object.defineProperty(exports, "formatRefTemplate", {
|
|
1218
1209
|
enumerable: true,
|
|
1219
|
-
get: function () { return
|
|
1210
|
+
get: function () { return chunkTBDXTV22_cjs.formatRefTemplate; }
|
|
1220
1211
|
});
|
|
1221
1212
|
Object.defineProperty(exports, "parseRefExpression", {
|
|
1222
1213
|
enumerable: true,
|
|
1223
|
-
get: function () { return
|
|
1214
|
+
get: function () { return chunkTBDXTV22_cjs.parseRefExpression; }
|
|
1224
1215
|
});
|
|
1225
1216
|
Object.defineProperty(exports, "parseTemplate", {
|
|
1226
1217
|
enumerable: true,
|
|
1227
|
-
get: function () { return
|
|
1218
|
+
get: function () { return chunkTBDXTV22_cjs.parseTemplate; }
|
|
1219
|
+
});
|
|
1220
|
+
Object.defineProperty(exports, "durationMs", {
|
|
1221
|
+
enumerable: true,
|
|
1222
|
+
get: function () { return chunkFR7KYWRO_cjs.durationMs; }
|
|
1228
1223
|
});
|
|
1229
1224
|
exports.IR_V2_SCHEMA = IR_V2_SCHEMA;
|
|
1230
1225
|
exports.IR_V2_SCHEMA_ID = IR_V2_SCHEMA_ID;
|
|
@@ -1232,7 +1227,6 @@ exports.WORKFLOW_DOCUMENT_FORMAT = WORKFLOW_DOCUMENT_FORMAT;
|
|
|
1232
1227
|
exports.buildExportDocument = buildExportDocument;
|
|
1233
1228
|
exports.checkScheduleSpec = checkScheduleSpec;
|
|
1234
1229
|
exports.deriveInterface = deriveInterface;
|
|
1235
|
-
exports.durationMs = durationMs;
|
|
1236
1230
|
exports.envelopeSchemaVersion = envelopeSchemaVersion;
|
|
1237
1231
|
exports.executorNodeView = executorNodeView;
|
|
1238
1232
|
exports.executorView = executorView;
|