@synergenius/flow-weaver 0.22.0 → 0.22.3

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.
@@ -157,10 +157,14 @@ function generateRuntimeSection(functionName, production, moduleFormat = 'esm',
157
157
  // External runtime: generate import statements instead of inline code
158
158
  lines.push(`import { GeneratedExecutionContext, CancellationError } from '${externalRuntimePath}';`);
159
159
  if (!production) {
160
- lines.push(`import type { TDebugger } from '${externalRuntimePath}';`);
160
+ lines.push(`import type { TDebugger, TDebugController } from '${externalRuntimePath}';`);
161
161
  // Declare __flowWeaverDebugger__ so body code can reference it
162
162
  lines.push('declare const __flowWeaverDebugger__: TDebugger | undefined;');
163
163
  }
164
+ else {
165
+ // Production mode still needs TDebugController for the __ctrl__ variable
166
+ lines.push(`import type { TDebugController } from '${externalRuntimePath}';`);
167
+ }
164
168
  }
165
169
  else {
166
170
  // Inline runtime: embed all types and classes directly
@@ -2,13 +2,17 @@
2
2
  /**
3
3
  * Templates command - list available templates
4
4
  */
5
- import { workflowTemplates, nodeTemplates } from "../templates/index.js";
5
+ import { nodeTemplates, getAllWorkflowTemplates } from "../templates/index.js";
6
+ import { loadPackTemplates } from "../templates/pack-loader.js";
6
7
  import { logger } from "../utils/logger.js";
7
8
  export async function templatesCommand(options = {}) {
8
9
  const { json = false } = options;
10
+ // Load pack-contributed templates so they appear alongside core templates
11
+ await loadPackTemplates(process.cwd());
12
+ const allWorkflowTemplates = getAllWorkflowTemplates();
9
13
  if (json) {
10
14
  console.log(JSON.stringify({
11
- workflows: workflowTemplates.map((t) => ({
15
+ workflows: allWorkflowTemplates.map((t) => ({
12
16
  id: t.id,
13
17
  name: t.name,
14
18
  description: t.description,
@@ -26,7 +30,7 @@ export async function templatesCommand(options = {}) {
26
30
  logger.newline();
27
31
  // Group by category
28
32
  const categories = new Map();
29
- for (const template of workflowTemplates) {
33
+ for (const template of allWorkflowTemplates) {
30
34
  const cat = template.category;
31
35
  if (!categories.has(cat)) {
32
36
  categories.set(cat, []);