buddy-workbench 0.2.15 → 0.2.16

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "buddy-workbench",
3
- "version": "0.2.15",
3
+ "version": "0.2.16",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "bin": {
@@ -4,7 +4,13 @@ import { promisify } from 'node:util';
4
4
  const execFileAsync = promisify(execFile);
5
5
  const parentPid = Number(process.env.BUDDY_PARENT_PID);
6
6
  const command = process.env.BUDDY_SCRIPT_COMMAND;
7
- const child = spawn(command, {
7
+ // GUI apps on macOS can start with a much lower file-descriptor soft limit
8
+ // than an interactive Terminal session. Raise it for the command shell when
9
+ // the inherited hard limit allows it, so file watchers in dev servers work.
10
+ const launchCommand = process.platform === 'darwin'
11
+ ? `ulimit -n 65536 2>/dev/null || ulimit -n 4096 2>/dev/null || true\n${command}`
12
+ : command;
13
+ const child = spawn(launchCommand, {
8
14
  cwd: process.cwd(),
9
15
  shell: true,
10
16
  stdio: 'inherit',