@dfosco/storyboard-core 4.2.0-alpha.7 → 4.2.0-alpha.8

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": "@dfosco/storyboard-core",
3
- "version": "4.2.0-alpha.7",
3
+ "version": "4.2.0-alpha.8",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -161,6 +161,12 @@ export function setupTerminalServer(httpServer, base = '/', branch = 'unknown')
161
161
  if (addr && addr.port) actualServerPort = addr.port
162
162
  } catch {}
163
163
 
164
+ // Ensure node-pty spawn-helper has execute permission (npm install can strip it)
165
+ try {
166
+ const nodePtyDir = resolve(process.cwd(), 'node_modules/node-pty/prebuilds')
167
+ execSync(`chmod +x "${nodePtyDir}"/darwin-*/spawn-helper 2>/dev/null || true`, { stdio: 'ignore' })
168
+ } catch {}
169
+
164
170
  // Initialize registry and terminal config
165
171
  const root = process.cwd()
166
172
  const termCfg = readTerminalConfig()
@@ -270,6 +276,7 @@ function handleConnection(ws, widgetId, canvasId, prettyName) {
270
276
  let ptyProcess
271
277
  let isNewSession = false
272
278
 
279
+ try {
273
280
  if (hasTmux) {
274
281
  const reattach = tmuxSessionExists(tmuxName)
275
282
 
@@ -353,6 +360,15 @@ function handleConnection(ws, widgetId, canvasId, prettyName) {
353
360
  env,
354
361
  })
355
362
  }
363
+ } catch (spawnErr) {
364
+ console.error(`[storyboard] terminal spawn failed: ${spawnErr.message}`)
365
+ if (ws.readyState === ws.OPEN) {
366
+ ws.send(`\r\n\x1b[31m✖ Terminal failed to start: ${spawnErr.message}\x1b[0m\r\n`)
367
+ ws.send(`\x1b[2mTry: chmod +x node_modules/node-pty/prebuilds/darwin-*/spawn-helper\x1b[0m\r\n`)
368
+ ws.close()
369
+ }
370
+ return
371
+ }
356
372
 
357
373
  const generation = entry.generation
358
374
  ptyProcesses.set(tmuxName, ptyProcess)