lunel-cli 0.1.10 → 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.
Files changed (2) hide show
  1. package/dist/index.js +12 -4
  2. 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.9";
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,10 +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
- // Unix: spawn shell, let it run commands via stdin
724
- // Don't use -i as it tries to control the parent terminal
725
- proc = spawn(shell, [], {
732
+ // Linux: script -q -c shell /dev/null
733
+ proc = spawn('script', ['-qc', shell, '/dev/null'], {
726
734
  cwd: ROOT_DIR,
727
735
  env: cleanEnv,
728
736
  stdio: ['pipe', 'pipe', 'pipe'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lunel-cli",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "author": [
5
5
  {
6
6
  "name": "Soham Bharambe",