@formigio/fazemos-cli 0.10.2 → 0.10.4

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/index.d.ts CHANGED
@@ -1,2 +1,4 @@
1
1
  #!/usr/bin/env node
2
- export {};
2
+ import { Command } from 'commander';
3
+ declare const program: Command;
4
+ export { program };
package/dist/index.js CHANGED
@@ -4212,7 +4212,8 @@ step
4212
4212
  .option('--callback-token <token>', 'Callback token')
4213
4213
  .action(async (instanceId, stepId, opts) => {
4214
4214
  try {
4215
- const body = { text: opts.text };
4215
+ // I19: API expects `append` not `text`. Flag stays --text (operator muscle memory).
4216
+ const body = { append: opts.text };
4216
4217
  if (opts.callbackToken)
4217
4218
  body.callbackToken = opts.callbackToken;
4218
4219
  await api('PATCH', `/api/pipeline-instances/${instanceId}/steps/${stepId}/output`, body);
@@ -7232,5 +7233,12 @@ docs
7232
7233
  handleScopedError(err);
7233
7234
  }
7234
7235
  });
7235
- program.parse();
7236
+ // Only auto-parse when invoked as the entry point (i.e. `node dist/index.js ...`
7237
+ // or `npx tsx src/index.ts ...`). When imported as a module — by tests using
7238
+ // `vi.mock` to intercept `api()` and asserting on `program.parseAsync(...)` —
7239
+ // skip auto-parse so the test controls invocation.
7240
+ const isMainModule = import.meta.url === `file://${process.argv[1]}`;
7241
+ if (isMainModule)
7242
+ program.parse();
7243
+ export { program };
7236
7244
  //# sourceMappingURL=index.js.map