@synergenius/flow-weaver 0.30.4 → 0.30.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli/flow-weaver.mjs
CHANGED
|
@@ -5987,7 +5987,7 @@ var VERSION;
|
|
|
5987
5987
|
var init_generated_version = __esm({
|
|
5988
5988
|
"src/generated-version.ts"() {
|
|
5989
5989
|
"use strict";
|
|
5990
|
-
VERSION = "0.30.
|
|
5990
|
+
VERSION = "0.30.5";
|
|
5991
5991
|
}
|
|
5992
5992
|
});
|
|
5993
5993
|
|
|
@@ -7760,7 +7760,18 @@ function generateControlFlowWithExecutionContext(workflow, nodeTypes, isAsync2,
|
|
|
7760
7760
|
);
|
|
7761
7761
|
}
|
|
7762
7762
|
}
|
|
7763
|
-
const
|
|
7763
|
+
const allPropsUnsorted = [...defaults, ...returnProps];
|
|
7764
|
+
const onSuccessProp = allPropsUnsorted.find((p) => p.trimStart().startsWith("onSuccess"));
|
|
7765
|
+
const onFailureProp = allPropsUnsorted.find((p) => p.trimStart().startsWith("onFailure"));
|
|
7766
|
+
const dataProps = allPropsUnsorted.filter((p) => {
|
|
7767
|
+
const key = p.trimStart().split(":")[0].trim();
|
|
7768
|
+
return key !== "onSuccess" && key !== "onFailure";
|
|
7769
|
+
});
|
|
7770
|
+
const orderedProps = [];
|
|
7771
|
+
if (onSuccessProp) orderedProps.push(onSuccessProp);
|
|
7772
|
+
if (onFailureProp) orderedProps.push(onFailureProp);
|
|
7773
|
+
orderedProps.push(...dataProps);
|
|
7774
|
+
const allProps = orderedProps.join(", ");
|
|
7764
7775
|
lines.push(` const finalResult = { ${allProps} };`);
|
|
7765
7776
|
lines.push("");
|
|
7766
7777
|
lines.push(` ${awaitPrefixTop}ctx.sendStatusChangedEvent({`);
|
|
@@ -88924,7 +88935,7 @@ function parseIntStrict(value) {
|
|
|
88924
88935
|
// src/cli/index.ts
|
|
88925
88936
|
init_logger();
|
|
88926
88937
|
init_error_utils();
|
|
88927
|
-
var version2 = true ? "0.30.
|
|
88938
|
+
var version2 = true ? "0.30.5" : "0.0.0-dev";
|
|
88928
88939
|
var program2 = new Command();
|
|
88929
88940
|
program2.name("fw").description("Flow Weaver Annotations - Compile and validate workflow files").option("-v, --version", "Output the current version").option("--no-color", "Disable colors").option("--color", "Force colors").on("option:version", () => {
|
|
88930
88941
|
logger.banner(version2);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.30.
|
|
1
|
+
export declare const VERSION = "0.30.5";
|
|
2
2
|
//# sourceMappingURL=generated-version.d.ts.map
|
|
@@ -607,9 +607,22 @@ export function generateControlFlowWithExecutionContext(workflow, nodeTypes, isA
|
|
|
607
607
|
lines.push(` ${setCallForDefaults}({ id: '${RESERVED_NODE_NAMES.EXIT}', portName: 'onFailure', executionIndex: exitIdx, nodeTypeName: '${RESERVED_NODE_NAMES.EXIT}' }, false);`);
|
|
608
608
|
}
|
|
609
609
|
}
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
610
|
+
// Assemble final result with onSuccess first, onFailure second, then data ports.
|
|
611
|
+
// This ensures JSON.stringify output is readable and predictable.
|
|
612
|
+
const allPropsUnsorted = [...defaults, ...returnProps];
|
|
613
|
+
const onSuccessProp = allPropsUnsorted.find(p => p.trimStart().startsWith('onSuccess'));
|
|
614
|
+
const onFailureProp = allPropsUnsorted.find(p => p.trimStart().startsWith('onFailure'));
|
|
615
|
+
const dataProps = allPropsUnsorted.filter(p => {
|
|
616
|
+
const key = p.trimStart().split(':')[0].trim();
|
|
617
|
+
return key !== 'onSuccess' && key !== 'onFailure';
|
|
618
|
+
});
|
|
619
|
+
const orderedProps = [];
|
|
620
|
+
if (onSuccessProp)
|
|
621
|
+
orderedProps.push(onSuccessProp);
|
|
622
|
+
if (onFailureProp)
|
|
623
|
+
orderedProps.push(onFailureProp);
|
|
624
|
+
orderedProps.push(...dataProps);
|
|
625
|
+
const allProps = orderedProps.join(', ');
|
|
613
626
|
lines.push(` const finalResult = { ${allProps} };`);
|
|
614
627
|
lines.push('');
|
|
615
628
|
lines.push(` ${awaitPrefixTop}ctx.sendStatusChangedEvent({`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synergenius/flow-weaver",
|
|
3
|
-
"version": "0.30.
|
|
3
|
+
"version": "0.30.5",
|
|
4
4
|
"description": "Flow Weaver: deterministic TypeScript workflow compiler. Define workflows with JSDoc annotations, compile to standalone functions with zero runtime dependencies.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|