@synergenius/flow-weaver 0.17.4 → 0.17.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.
@@ -148,11 +148,8 @@ export function parseTriggerLine(input, warnings) {
148
148
  parserInstance.input = lexResult.tokens;
149
149
  const cst = parserInstance.triggerLine();
150
150
  if (parserInstance.errors.length > 0) {
151
- const firstError = parserInstance.errors[0];
152
- const truncatedInput = input.length > 60 ? input.substring(0, 60) + '...' : input;
153
- warnings.push(`Failed to parse trigger line: "${truncatedInput}"\n` +
154
- ` Error: ${firstError.message}\n` +
155
- ` Expected format: @trigger event="name" or @trigger cron="expr"`);
151
+ // Don't warn here — return null so domain-specific handlers (e.g. CI/CD)
152
+ // get a chance to parse the trigger. The caller can warn if nothing handles it.
156
153
  return null;
157
154
  }
158
155
  const result = visitorInstance.visit(cst);
@@ -17051,13 +17051,6 @@ function parseTriggerLine(input, warnings) {
17051
17051
  parserInstance8.input = lexResult.tokens;
17052
17052
  const cst = parserInstance8.triggerLine();
17053
17053
  if (parserInstance8.errors.length > 0) {
17054
- const firstError = parserInstance8.errors[0];
17055
- const truncatedInput = input.length > 60 ? input.substring(0, 60) + "..." : input;
17056
- warnings.push(
17057
- `Failed to parse trigger line: "${truncatedInput}"
17058
- Error: ${firstError.message}
17059
- Expected format: @trigger event="name" or @trigger cron="expr"`
17060
- );
17061
17054
  return null;
17062
17055
  }
17063
17056
  const result = visitorInstance8.visit(cst);
@@ -25614,7 +25607,7 @@ var VERSION2;
25614
25607
  var init_generated_version = __esm({
25615
25608
  "src/generated-version.ts"() {
25616
25609
  "use strict";
25617
- VERSION2 = "0.17.4";
25610
+ VERSION2 = "0.17.5";
25618
25611
  }
25619
25612
  });
25620
25613
 
@@ -35966,6 +35959,12 @@ var init_jsdoc_parser = __esm({
35966
35959
  const comment = (tag.getCommentText() || "").trim();
35967
35960
  const result = parseTriggerLine(`@trigger ${comment}`, warnings);
35968
35961
  if (result) {
35962
+ const cicdKeywords = ["push", "pull_request", "dispatch", "tag", "schedule"];
35963
+ if (result.event && cicdKeywords.includes(result.event)) {
35964
+ warnings.push(
35965
+ `@trigger event="${result.event}" is treated as an Inngest event trigger, not a CI/CD trigger. For CI/CD, use: @trigger ${result.event}`
35966
+ );
35967
+ }
35969
35968
  config2.trigger = config2.trigger || {};
35970
35969
  if (result.event) config2.trigger.event = result.event;
35971
35970
  if (result.cron) config2.trigger.cron = result.cron;
@@ -36680,7 +36679,8 @@ var init_parser2 = __esm({
36680
36679
  nodeTypes.push(...inferredNodeTypes);
36681
36680
  const workflows = this.extractWorkflows(sourceFile, nodeTypes, filePath, errors2, warnings);
36682
36681
  const patterns = this.extractPatterns(sourceFile, nodeTypes, filePath, errors2, warnings);
36683
- const result = { workflows, nodeTypes, patterns, errors: errors2, warnings };
36682
+ const dedupedWarnings = [...new Set(warnings)];
36683
+ const result = { workflows, nodeTypes, patterns, errors: errors2, warnings: dedupedWarnings };
36684
36684
  this.project.removeSourceFile(sourceFile);
36685
36685
  if (!externalNodeTypes?.length) {
36686
36686
  this.parseCache.set(filePath, {
@@ -36720,12 +36720,13 @@ var init_parser2 = __esm({
36720
36720
  const workflows = this.extractWorkflows(sourceFile, nodeTypes, virtualPath, errors2, warnings);
36721
36721
  const patterns = this.extractPatterns(sourceFile, nodeTypes, virtualPath, errors2, warnings);
36722
36722
  this.project.removeSourceFile(sourceFile);
36723
+ const dedupedWarnings = [...new Set(warnings)];
36723
36724
  return {
36724
36725
  workflows,
36725
36726
  nodeTypes,
36726
36727
  patterns,
36727
36728
  errors: errors2,
36728
- warnings
36729
+ warnings: dedupedWarnings
36729
36730
  };
36730
36731
  }
36731
36732
  clearCache() {
@@ -109304,7 +109305,7 @@ function displayInstalledPackage(pkg) {
109304
109305
 
109305
109306
  // src/cli/index.ts
109306
109307
  init_error_utils();
109307
- var version2 = true ? "0.17.4" : "0.0.0-dev";
109308
+ var version2 = true ? "0.17.5" : "0.0.0-dev";
109308
109309
  var program2 = new Command();
109309
109310
  program2.name("flow-weaver").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", () => {
109310
109311
  logger.banner(version2);
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.17.4";
1
+ export declare const VERSION = "0.17.5";
2
2
  //# sourceMappingURL=generated-version.d.ts.map
@@ -1,3 +1,3 @@
1
1
  // Auto-generated by scripts/generate-version.ts — do not edit manually
2
- export const VERSION = '0.17.4';
2
+ export const VERSION = '0.17.5';
3
3
  //# sourceMappingURL=generated-version.js.map
@@ -1055,6 +1055,12 @@ export class JSDocParser {
1055
1055
  // Try core FW trigger parsing first (event= and/or cron=)
1056
1056
  const result = parseTriggerLine(`@trigger ${comment}`, warnings);
1057
1057
  if (result) {
1058
+ // Warn if the event name matches a CI/CD trigger keyword (likely user error)
1059
+ const cicdKeywords = ['push', 'pull_request', 'dispatch', 'tag', 'schedule'];
1060
+ if (result.event && cicdKeywords.includes(result.event)) {
1061
+ warnings.push(`@trigger event="${result.event}" is treated as an Inngest event trigger, not a CI/CD trigger. ` +
1062
+ `For CI/CD, use: @trigger ${result.event}`);
1063
+ }
1058
1064
  // Merge: multiple @trigger tags accumulate (event + cron can be separate tags)
1059
1065
  config.trigger = config.trigger || {};
1060
1066
  if (result.event)
package/dist/parser.js CHANGED
@@ -187,7 +187,9 @@ export class AnnotationParser {
187
187
  nodeTypes.push(...inferredNodeTypes);
188
188
  const workflows = this.extractWorkflows(sourceFile, nodeTypes, filePath, errors, warnings);
189
189
  const patterns = this.extractPatterns(sourceFile, nodeTypes, filePath, errors, warnings);
190
- const result = { workflows, nodeTypes, patterns, errors, warnings };
190
+ // Deduplicate warnings (extractWorkflowSignatures + extractWorkflows both parse JSDoc)
191
+ const dedupedWarnings = [...new Set(warnings)];
192
+ const result = { workflows, nodeTypes, patterns, errors, warnings: dedupedWarnings };
191
193
  // Clean up source file to prevent ts-morph Project bloat
192
194
  // (results are captured in the returned AST, source file is no longer needed)
193
195
  this.project.removeSourceFile(sourceFile);
@@ -238,12 +240,14 @@ export class AnnotationParser {
238
240
  // Clean up virtual source file to prevent memory bloat
239
241
  // (tests create many unique virtual paths that accumulate)
240
242
  this.project.removeSourceFile(sourceFile);
243
+ // Deduplicate warnings (extractWorkflowSignatures + extractWorkflows both parse JSDoc)
244
+ const dedupedWarnings = [...new Set(warnings)];
241
245
  return {
242
246
  workflows,
243
247
  nodeTypes,
244
248
  patterns,
245
249
  errors,
246
- warnings,
250
+ warnings: dedupedWarnings,
247
251
  };
248
252
  }
249
253
  clearCache() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synergenius/flow-weaver",
3
- "version": "0.17.4",
3
+ "version": "0.17.5",
4
4
  "description": "Deterministic workflow compiler for AI agents. Compiles to standalone TypeScript, no runtime dependencies.",
5
5
  "private": false,
6
6
  "type": "module",