lunel-cli 0.1.9 → 0.1.11
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 +12 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import * as os from "os";
|
|
|
9
9
|
import { spawn, execSync } from "child_process";
|
|
10
10
|
import { createServer } from "net";
|
|
11
11
|
const PROXY_URL = process.env.LUNEL_PROXY_URL || "https://gateway.lunel.dev";
|
|
12
|
-
const VERSION = "0.1.
|
|
12
|
+
const VERSION = "0.1.10";
|
|
13
13
|
// Root directory - sandbox all file operations to this
|
|
14
14
|
const ROOT_DIR = process.cwd();
|
|
15
15
|
// Simple ANSI parser for terminal state
|
|
@@ -719,9 +719,18 @@ function handleTerminalSpawn(payload) {
|
|
|
719
719
|
shell: true,
|
|
720
720
|
});
|
|
721
721
|
}
|
|
722
|
+
else if (os.platform() === 'darwin') {
|
|
723
|
+
// macOS: use script to create a PTY
|
|
724
|
+
// script -q /dev/null shell - creates PTY, logs to /dev/null, runs shell
|
|
725
|
+
proc = spawn('script', ['-q', '/dev/null', shell], {
|
|
726
|
+
cwd: ROOT_DIR,
|
|
727
|
+
env: cleanEnv,
|
|
728
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
729
|
+
});
|
|
730
|
+
}
|
|
722
731
|
else {
|
|
723
|
-
//
|
|
724
|
-
proc = spawn(
|
|
732
|
+
// Linux: script -q -c shell /dev/null
|
|
733
|
+
proc = spawn('script', ['-qc', shell, '/dev/null'], {
|
|
725
734
|
cwd: ROOT_DIR,
|
|
726
735
|
env: cleanEnv,
|
|
727
736
|
stdio: ['pipe', 'pipe', 'pipe'],
|