a2acalling 0.6.12 → 0.6.13
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/scripts/postinstall.js +9 -5
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -15,9 +15,12 @@
|
|
|
15
15
|
// so the full onboarding completes unattended: port selection, hostname
|
|
16
16
|
// detection, server start, and disclosure prompt output.
|
|
17
17
|
//
|
|
18
|
-
// 2.
|
|
19
|
-
//
|
|
20
|
-
// the
|
|
18
|
+
// 2. stdout → stderr. npm suppresses lifecycle script stdout (piped to its
|
|
19
|
+
// internal log buffer). stderr passes through to the caller. By mapping
|
|
20
|
+
// the child's stdout to fd 2 (stderr), the entire onboarding walkthrough
|
|
21
|
+
// is visible to the installing agent or terminal — banner, port selection,
|
|
22
|
+
// server start confirmation, and the disclosure prompt all come through.
|
|
23
|
+
// stdin is piped with no input so prompts auto-accept defaults.
|
|
21
24
|
//
|
|
22
25
|
// 3. Never fail the install. If quickstart can't launch (e.g. missing node
|
|
23
26
|
// binary edge case), we print a hint and exit 0. A broken postinstall
|
|
@@ -38,9 +41,10 @@ const { spawnSync } = require('child_process');
|
|
|
38
41
|
const initCwd = process.env.INIT_CWD || process.env.HOME || process.cwd();
|
|
39
42
|
const cliPath = path.join(__dirname, '..', 'bin', 'cli.js');
|
|
40
43
|
|
|
41
|
-
// Launch quickstart
|
|
44
|
+
// Launch quickstart with stdout→stderr so npm doesn't swallow the output.
|
|
45
|
+
// stdin is piped (empty) so all prompts auto-accept their defaults.
|
|
42
46
|
const result = spawnSync(process.execPath, [cliPath, 'quickstart'], {
|
|
43
|
-
stdio: '
|
|
47
|
+
stdio: ['pipe', 2, 2],
|
|
44
48
|
cwd: initCwd,
|
|
45
49
|
env: {
|
|
46
50
|
...process.env,
|