@dvquys/qrec 0.2.1 → 0.2.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.
- package/package.json +1 -1
- package/plugin/scripts/qrec-cli.js +10 -10
- package/plugin/scripts/qrec.cjs +1383 -24
package/package.json
CHANGED
|
@@ -48,7 +48,16 @@ if (userArgs.includes("serve") && userArgs.includes("--daemon")) {
|
|
|
48
48
|
process.exit(0);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
//
|
|
51
|
+
// TTY: pass stdin directly so interactive prompts (e.g. teardown Y/N) work.
|
|
52
|
+
if (process.stdin.isTTY) {
|
|
53
|
+
const result = spawnSync(bunPath, bunArgs, {
|
|
54
|
+
stdio: "inherit",
|
|
55
|
+
env: process.env,
|
|
56
|
+
});
|
|
57
|
+
process.exit(result.status ?? 1);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Non-TTY (hook/pipe): buffer stdin before passing to bun (avoids libuv pipe crash on Linux).
|
|
52
61
|
const stdinChunks = [];
|
|
53
62
|
process.stdin.on("data", chunk => stdinChunks.push(chunk));
|
|
54
63
|
process.stdin.on("end", () => {
|
|
@@ -60,12 +69,3 @@ process.stdin.on("end", () => {
|
|
|
60
69
|
});
|
|
61
70
|
process.exit(result.status ?? 1);
|
|
62
71
|
});
|
|
63
|
-
|
|
64
|
-
if (process.stdin.isTTY) {
|
|
65
|
-
process.stdin.destroy();
|
|
66
|
-
const result = spawnSync(bunPath, bunArgs, {
|
|
67
|
-
stdio: ["ignore", "inherit", "inherit"],
|
|
68
|
-
env: process.env,
|
|
69
|
-
});
|
|
70
|
-
process.exit(result.status ?? 1);
|
|
71
|
-
}
|