@synergenius/flow-weaver 0.29.0 → 0.29.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/dist/api/parse.js
CHANGED
|
@@ -32,6 +32,7 @@ export async function parseWorkflow(filePath, options) {
|
|
|
32
32
|
// Parse the file to extract nodes and workflows
|
|
33
33
|
const parsed = parser.parse(filePath);
|
|
34
34
|
warnings.push(...parsed.warnings);
|
|
35
|
+
errors.push(...parsed.errors);
|
|
35
36
|
// Get available workflow names
|
|
36
37
|
availableWorkflows = parsed.workflows.map((w) => w.functionName);
|
|
37
38
|
// Determine which workflow to use
|
|
@@ -82,7 +83,7 @@ export async function parseWorkflow(filePath, options) {
|
|
|
82
83
|
}
|
|
83
84
|
return {
|
|
84
85
|
ast: workflow,
|
|
85
|
-
errors
|
|
86
|
+
errors,
|
|
86
87
|
warnings,
|
|
87
88
|
availableWorkflows,
|
|
88
89
|
allWorkflows: parsed.workflows,
|
|
@@ -65,14 +65,13 @@ class NodeParser extends CstParser {
|
|
|
65
65
|
this.CONSUME(LabelPrefix);
|
|
66
66
|
this.CONSUME(StringLiteral, { LABEL: 'labelValue' });
|
|
67
67
|
});
|
|
68
|
-
// expr: port="value", port2="value2"
|
|
68
|
+
// expr: port="value", port2="value2" (comma optional between assignments)
|
|
69
69
|
exprAttr = this.RULE('exprAttr', () => {
|
|
70
70
|
this.CONSUME(ExprPrefix);
|
|
71
|
-
this.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
},
|
|
71
|
+
this.SUBRULE(this.exprAssignment);
|
|
72
|
+
this.MANY(() => {
|
|
73
|
+
this.OPTION(() => this.CONSUME(Comma));
|
|
74
|
+
this.SUBRULE2(this.exprAssignment);
|
|
76
75
|
});
|
|
77
76
|
});
|
|
78
77
|
// port="value"
|
|
@@ -524,6 +523,10 @@ const visitorInstance = new NodeVisitor();
|
|
|
524
523
|
export function parseNodeLine(input, warnings) {
|
|
525
524
|
const lexResult = JSDocLexer.tokenize(input);
|
|
526
525
|
if (lexResult.errors.length > 0) {
|
|
526
|
+
const truncatedInput = input.length > 60 ? input.substring(0, 60) + '...' : input;
|
|
527
|
+
warnings.push(`Failed to tokenize node line: "${truncatedInput}"\n` +
|
|
528
|
+
` Error: ${lexResult.errors[0].message}\n` +
|
|
529
|
+
` Expected format: @node instanceId NodeType`);
|
|
527
530
|
return null;
|
|
528
531
|
}
|
|
529
532
|
// Check if starts with @node
|
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.29.
|
|
5990
|
+
VERSION = "0.29.1";
|
|
5991
5991
|
}
|
|
5992
5992
|
});
|
|
5993
5993
|
|
|
@@ -24365,6 +24365,12 @@ var init_port_parser = __esm({
|
|
|
24365
24365
|
function parseNodeLine(input, warnings) {
|
|
24366
24366
|
const lexResult = JSDocLexer.tokenize(input);
|
|
24367
24367
|
if (lexResult.errors.length > 0) {
|
|
24368
|
+
const truncatedInput = input.length > 60 ? input.substring(0, 60) + "..." : input;
|
|
24369
|
+
warnings.push(
|
|
24370
|
+
`Failed to tokenize node line: "${truncatedInput}"
|
|
24371
|
+
Error: ${lexResult.errors[0].message}
|
|
24372
|
+
Expected format: @node instanceId NodeType`
|
|
24373
|
+
);
|
|
24368
24374
|
return null;
|
|
24369
24375
|
}
|
|
24370
24376
|
if (lexResult.tokens.length === 0) {
|
|
@@ -24452,14 +24458,13 @@ var init_node_parser = __esm({
|
|
|
24452
24458
|
this.CONSUME(LabelPrefix);
|
|
24453
24459
|
this.CONSUME(StringLiteral, { LABEL: "labelValue" });
|
|
24454
24460
|
});
|
|
24455
|
-
// expr: port="value", port2="value2"
|
|
24461
|
+
// expr: port="value", port2="value2" (comma optional between assignments)
|
|
24456
24462
|
exprAttr = this.RULE("exprAttr", () => {
|
|
24457
24463
|
this.CONSUME(ExprPrefix);
|
|
24458
|
-
this.
|
|
24459
|
-
|
|
24460
|
-
|
|
24461
|
-
|
|
24462
|
-
}
|
|
24464
|
+
this.SUBRULE(this.exprAssignment);
|
|
24465
|
+
this.MANY(() => {
|
|
24466
|
+
this.OPTION(() => this.CONSUME(Comma));
|
|
24467
|
+
this.SUBRULE2(this.exprAssignment);
|
|
24463
24468
|
});
|
|
24464
24469
|
});
|
|
24465
24470
|
// port="value"
|
|
@@ -30075,6 +30080,7 @@ async function parseWorkflow(filePath, options) {
|
|
|
30075
30080
|
}
|
|
30076
30081
|
const parsed = parser.parse(filePath);
|
|
30077
30082
|
warnings.push(...parsed.warnings);
|
|
30083
|
+
errors2.push(...parsed.errors);
|
|
30078
30084
|
availableWorkflows = parsed.workflows.map((w) => w.functionName);
|
|
30079
30085
|
let workflowName = options?.workflowName;
|
|
30080
30086
|
if (!workflowName) {
|
|
@@ -30124,7 +30130,7 @@ async function parseWorkflow(filePath, options) {
|
|
|
30124
30130
|
}
|
|
30125
30131
|
return {
|
|
30126
30132
|
ast: workflow,
|
|
30127
|
-
errors:
|
|
30133
|
+
errors: errors2,
|
|
30128
30134
|
warnings,
|
|
30129
30135
|
availableWorkflows,
|
|
30130
30136
|
allWorkflows: parsed.workflows
|
|
@@ -88927,7 +88933,7 @@ function parseIntStrict(value) {
|
|
|
88927
88933
|
// src/cli/index.ts
|
|
88928
88934
|
init_logger();
|
|
88929
88935
|
init_error_utils();
|
|
88930
|
-
var version2 = true ? "0.29.
|
|
88936
|
+
var version2 = true ? "0.29.1" : "0.0.0-dev";
|
|
88931
88937
|
var program2 = new Command();
|
|
88932
88938
|
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", () => {
|
|
88933
88939
|
logger.banner(version2);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.29.
|
|
1
|
+
export declare const VERSION = "0.29.1";
|
|
2
2
|
//# sourceMappingURL=generated-version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synergenius/flow-weaver",
|
|
3
|
-
"version": "0.29.
|
|
3
|
+
"version": "0.29.1",
|
|
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",
|