@agjs/tsforge 0.3.0 → 0.3.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.
- package/package.json +1 -1
- package/src/detect-gate.ts +8 -4
package/package.json
CHANGED
package/src/detect-gate.ts
CHANGED
|
@@ -385,10 +385,14 @@ async function initMswWorker(cwd: string): Promise<void> {
|
|
|
385
385
|
}
|
|
386
386
|
|
|
387
387
|
try {
|
|
388
|
-
//
|
|
389
|
-
//
|
|
390
|
-
//
|
|
391
|
-
|
|
388
|
+
// `--no-save`, NOT a bare `init`: bare `init` (save flag absent) drops into an
|
|
389
|
+
// interactive @inquirer "save the worker dir to package.json?" prompt, which has
|
|
390
|
+
// no TTY in this headless pipeline and crashes the msw child with ExitPromptError.
|
|
391
|
+
// `--save` would answer it but rewrites package.json un-prettified (fails the
|
|
392
|
+
// gate's format check). `--no-save` copies the worker, skips package.json, and
|
|
393
|
+
// never prompts. The worker lands at the default `/mockServiceWorker.js`, which
|
|
394
|
+
// `worker.start()` finds without any config.
|
|
395
|
+
await Bun.spawn(["bunx", "msw", "init", "public", "--no-save"], {
|
|
392
396
|
cwd,
|
|
393
397
|
stdout: "inherit",
|
|
394
398
|
stderr: "inherit",
|