@formigio/fazemos-cli 0.10.5 → 0.10.6
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.js +10 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7287,12 +7287,16 @@ docs
|
|
|
7287
7287
|
handleScopedError(err);
|
|
7288
7288
|
}
|
|
7289
7289
|
});
|
|
7290
|
-
//
|
|
7291
|
-
//
|
|
7292
|
-
//
|
|
7293
|
-
//
|
|
7294
|
-
|
|
7295
|
-
|
|
7290
|
+
// Skip auto-parse only when running under Vitest (which sets process.env.VITEST).
|
|
7291
|
+
// Tests import `program` and drive it via `program.parseAsync(...)` after mocking
|
|
7292
|
+
// `./api.js`. In every other context — direct invocation, npx tsx, OR the bin
|
|
7293
|
+
// shim that does `import('../dist/index.js')` — auto-parse must run, otherwise
|
|
7294
|
+
// the CLI produces no output.
|
|
7295
|
+
//
|
|
7296
|
+
// Earlier `import.meta.url === file://${process.argv[1]}` check was wrong: the
|
|
7297
|
+
// bin shim's argv[1] is the shim path, not the dist/index.js path, so the guard
|
|
7298
|
+
// returned false and silently skipped parse.
|
|
7299
|
+
if (!process.env.VITEST)
|
|
7296
7300
|
program.parse();
|
|
7297
7301
|
export { program };
|
|
7298
7302
|
//# sourceMappingURL=index.js.map
|