@lark-apaas/fullstack-cli 1.1.49 → 1.1.50-alpha.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/dist/index.js +1 -1
- package/package.json +1 -1
- package/templates/scripts/dev.js +15 -2
package/dist/index.js
CHANGED
|
@@ -3051,7 +3051,7 @@ function hasStagedChanges(cwd = process.cwd()) {
|
|
|
3051
3051
|
throw new Error(`Failed to check staged changes: ${errorMsg}`);
|
|
3052
3052
|
}
|
|
3053
3053
|
function gitCommit(message, cwd = process.cwd()) {
|
|
3054
|
-
const result = spawnSync3("git", ["commit", "-m", message], {
|
|
3054
|
+
const result = spawnSync3("git", ["commit", "-m", message, "--no-verify"], {
|
|
3055
3055
|
cwd,
|
|
3056
3056
|
stdio: "pipe",
|
|
3057
3057
|
encoding: "utf-8"
|
package/package.json
CHANGED
package/templates/scripts/dev.js
CHANGED
|
@@ -59,10 +59,23 @@ function timestamp() {
|
|
|
59
59
|
);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
// Cap pending async stdout writes so a stalled pty consumer can't grow memory unbounded.
|
|
63
|
+
// Each pending fs.write retains ~1.5 KB (msg + libuv/V8 wrappers); 1000 ≈ ~1.5 MB ceiling.
|
|
64
|
+
let _stdoutInFlight = 0;
|
|
65
|
+
const STDOUT_MAX_INFLIGHT = 1000;
|
|
66
|
+
|
|
67
|
+
/** Write to dev.std.log (sync, guaranteed) + mirror to terminal (async, non-blocking) */
|
|
63
68
|
function writeOutput(msg) {
|
|
64
|
-
|
|
69
|
+
// File first and synchronously — read-logs reads this file; it must never be gated
|
|
70
|
+
// by the terminal consumer.
|
|
65
71
|
try { fs.writeSync(devStdLogFd, msg); } catch {}
|
|
72
|
+
// stdout mirror via async fs.write: if process.stdout is a pty/pipe whose consumer
|
|
73
|
+
// stalls, the block happens on the libuv threadpool, NOT the event loop — so the
|
|
74
|
+
// synchronous log-FILE writes above (and subsequent readline callbacks) keep running.
|
|
75
|
+
// Drop overflow when too many writes are already pending (best-effort mirror).
|
|
76
|
+
if (_stdoutInFlight >= STDOUT_MAX_INFLIGHT) { return; }
|
|
77
|
+
_stdoutInFlight++;
|
|
78
|
+
try { fs.write(1, msg, () => { _stdoutInFlight--; }); } catch { _stdoutInFlight--; }
|
|
66
79
|
}
|
|
67
80
|
|
|
68
81
|
/** Structured event log → terminal + dev.std.log + dev.log */
|