@synergenius/flow-weaver 0.21.15 → 0.21.16
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 +24 -3
- package/dist/generated-version.d.ts +1 -1
- package/dist/generated-version.js +1 -1
- package/dist/parser.js +28 -6
- package/package.json +1 -1
package/dist/cli/flow-weaver.mjs
CHANGED
|
@@ -9671,7 +9671,7 @@ var VERSION;
|
|
|
9671
9671
|
var init_generated_version = __esm({
|
|
9672
9672
|
"src/generated-version.ts"() {
|
|
9673
9673
|
"use strict";
|
|
9674
|
-
VERSION = "0.21.
|
|
9674
|
+
VERSION = "0.21.16";
|
|
9675
9675
|
}
|
|
9676
9676
|
});
|
|
9677
9677
|
|
|
@@ -36264,7 +36264,28 @@ ${fn.getText()}` : fn.getText();
|
|
|
36264
36264
|
Object.values(outputs).forEach((port) => {
|
|
36265
36265
|
if (port.scope) portScopes.add(port.scope);
|
|
36266
36266
|
});
|
|
36267
|
-
|
|
36267
|
+
let scopes;
|
|
36268
|
+
if (config2.scope) {
|
|
36269
|
+
scopes = [config2.scope];
|
|
36270
|
+
} else if (portScopes.size > 0) {
|
|
36271
|
+
const orderedScopes = [];
|
|
36272
|
+
try {
|
|
36273
|
+
const params = fn.getParameters();
|
|
36274
|
+
for (const param of params) {
|
|
36275
|
+
const paramName = param.getName();
|
|
36276
|
+
if (portScopes.has(paramName)) {
|
|
36277
|
+
orderedScopes.push(paramName);
|
|
36278
|
+
}
|
|
36279
|
+
}
|
|
36280
|
+
} catch {
|
|
36281
|
+
}
|
|
36282
|
+
for (const scope of portScopes) {
|
|
36283
|
+
if (!orderedScopes.includes(scope)) {
|
|
36284
|
+
orderedScopes.push(scope);
|
|
36285
|
+
}
|
|
36286
|
+
}
|
|
36287
|
+
scopes = orderedScopes;
|
|
36288
|
+
}
|
|
36268
36289
|
nodeTypes.push({
|
|
36269
36290
|
type: "NodeType",
|
|
36270
36291
|
name: nodeTypeName,
|
|
@@ -93209,7 +93230,7 @@ function displayInstalledPackage(pkg) {
|
|
|
93209
93230
|
// src/cli/index.ts
|
|
93210
93231
|
init_logger();
|
|
93211
93232
|
init_error_utils();
|
|
93212
|
-
var version2 = true ? "0.21.
|
|
93233
|
+
var version2 = true ? "0.21.16" : "0.0.0-dev";
|
|
93213
93234
|
var program2 = new Command();
|
|
93214
93235
|
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", () => {
|
|
93215
93236
|
logger.banner(version2);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.21.
|
|
1
|
+
export declare const VERSION = "0.21.16";
|
|
2
2
|
//# sourceMappingURL=generated-version.d.ts.map
|
package/dist/parser.js
CHANGED
|
@@ -789,13 +789,35 @@ export class AnnotationParser {
|
|
|
789
789
|
});
|
|
790
790
|
// Determine scopes array:
|
|
791
791
|
// - If node has node-level scope: use that (old architecture)
|
|
792
|
-
// - Otherwise if ports have scopes: use unique port scopes
|
|
792
|
+
// - Otherwise if ports have scopes: use unique port scopes ordered by function parameter position
|
|
793
793
|
// - Otherwise: undefined (no scopes)
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
794
|
+
let scopes;
|
|
795
|
+
if (config.scope) {
|
|
796
|
+
scopes = [config.scope];
|
|
797
|
+
}
|
|
798
|
+
else if (portScopes.size > 0) {
|
|
799
|
+
// Order scopes by function parameter position (callback params whose name matches a scope)
|
|
800
|
+
const orderedScopes = [];
|
|
801
|
+
try {
|
|
802
|
+
const params = fn.getParameters();
|
|
803
|
+
for (const param of params) {
|
|
804
|
+
const paramName = param.getName();
|
|
805
|
+
if (portScopes.has(paramName)) {
|
|
806
|
+
orderedScopes.push(paramName);
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
catch {
|
|
811
|
+
// Fall back to Set order if parameter extraction fails
|
|
812
|
+
}
|
|
813
|
+
// Add any scopes not found as params (e.g. from JSDoc-only scope declarations)
|
|
814
|
+
for (const scope of portScopes) {
|
|
815
|
+
if (!orderedScopes.includes(scope)) {
|
|
816
|
+
orderedScopes.push(scope);
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
scopes = orderedScopes;
|
|
820
|
+
}
|
|
799
821
|
nodeTypes.push({
|
|
800
822
|
type: 'NodeType',
|
|
801
823
|
name: nodeTypeName,
|
package/package.json
CHANGED