@synergenius/flow-weaver 0.32.0 → 0.32.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.
@@ -412,6 +412,43 @@ const handlers = {
412
412
  return { data: { authenticated: false, message: err instanceof Error ? err.message : String(err) } };
413
413
  }
414
414
  },
415
+ // ─── export ──────────────────────────────────────────────────────
416
+ export: async (args) => {
417
+ const filePath = resolveFile(args, args.cwd);
418
+ const target = String(args.target);
419
+ const outputDir = args.output ? path.resolve(String(args.output)) : path.resolve('export');
420
+ const dryRun = Boolean(args.dryRun);
421
+ // Parse and validate
422
+ const parseResult = await parseWorkflow(filePath);
423
+ if (parseResult.errors.length > 0) {
424
+ return { data: { errors: parseResult.errors } };
425
+ }
426
+ const validation = validateWorkflow(parseResult.ast);
427
+ if (!validation.valid) {
428
+ return { data: { errors: validation.errors.map((e) => typeof e === 'string' ? e : e.message) } };
429
+ }
430
+ // Compile first
431
+ await compileWorkflow(filePath);
432
+ // Load export target registry
433
+ const { createTargetRegistry } = await import('../deployment/index.js');
434
+ const registry = await createTargetRegistry(path.dirname(filePath));
435
+ const targetInstance = registry.get(target);
436
+ if (!targetInstance) {
437
+ const available = registry.getNames();
438
+ return { data: { error: `Unknown export target: ${target}. Available: ${available.join(', ')}` } };
439
+ }
440
+ if (dryRun) {
441
+ return { data: { target, filePath, outputDir, dryRun: true, message: `Would export to ${target} at ${outputDir}` } };
442
+ }
443
+ const workflowName = args.workflow || parseResult.ast.name;
444
+ const artifacts = await targetInstance.generate({
445
+ sourceFile: filePath,
446
+ workflowName,
447
+ displayName: workflowName,
448
+ outputDir,
449
+ });
450
+ return { data: { target, outputDir, files: artifacts.files.map((f) => f.relativePath) } };
451
+ },
415
452
  // ─── doctor ─────────────────────────────────────────────────────
416
453
  doctor: async (args) => {
417
454
  const cwd = args.cwd || process.cwd();
@@ -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.32.0";
5990
+ VERSION = "0.32.1";
5991
5991
  }
5992
5992
  });
5993
5993
 
@@ -88937,7 +88937,7 @@ function parseIntStrict(value) {
88937
88937
  // src/cli/index.ts
88938
88938
  init_logger();
88939
88939
  init_error_utils();
88940
- var version2 = true ? "0.32.0" : "0.0.0-dev";
88940
+ var version2 = true ? "0.32.1" : "0.0.0-dev";
88941
88941
  var program2 = new Command();
88942
88942
  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", () => {
88943
88943
  logger.banner(version2);
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.32.0";
1
+ export declare const VERSION = "0.32.1";
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.32.0';
2
+ export const VERSION = '0.32.1';
3
3
  //# sourceMappingURL=generated-version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synergenius/flow-weaver",
3
- "version": "0.32.0",
3
+ "version": "0.32.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",