@dfosco/storyboard-core 4.2.0-beta.0 → 4.2.0-beta.2
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-beta.
|
|
3
|
+
"version": "4.2.0-beta.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -66,7 +66,8 @@
|
|
|
66
66
|
"highlight.js": "^11.11.1",
|
|
67
67
|
"html-to-image": "^1.11.13",
|
|
68
68
|
"iconoir": "^7.11.0",
|
|
69
|
-
"jsonc-parser": "^3.3.1"
|
|
69
|
+
"jsonc-parser": "^3.3.1",
|
|
70
|
+
"ws": "^8.0.0"
|
|
70
71
|
},
|
|
71
72
|
"devDependencies": {
|
|
72
73
|
"@lucide/svelte": "^1.7.0",
|
|
@@ -83,5 +84,8 @@
|
|
|
83
84
|
"tailwindcss": "^4.2.2",
|
|
84
85
|
"tw-animate-css": "^1.4.0",
|
|
85
86
|
"vite": "^6.0.0"
|
|
87
|
+
},
|
|
88
|
+
"optionalDependencies": {
|
|
89
|
+
"node-pty": "^1.0.0"
|
|
86
90
|
}
|
|
87
|
-
}
|
|
91
|
+
}
|
|
@@ -26,7 +26,13 @@ import { execSync } from 'node:child_process'
|
|
|
26
26
|
import { readFileSync, mkdirSync, writeFileSync } from 'node:fs'
|
|
27
27
|
import { resolve, join } from 'node:path'
|
|
28
28
|
import { tmpdir } from 'node:os'
|
|
29
|
-
|
|
29
|
+
|
|
30
|
+
let WebSocketServer
|
|
31
|
+
try {
|
|
32
|
+
WebSocketServer = (await import('ws')).WebSocketServer
|
|
33
|
+
} catch {
|
|
34
|
+
WebSocketServer = null
|
|
35
|
+
}
|
|
30
36
|
import {
|
|
31
37
|
initRegistry,
|
|
32
38
|
registerSession,
|
|
@@ -133,8 +139,9 @@ function legacyKillSession(widgetId) {
|
|
|
133
139
|
* @param {string} branch — current git branch name
|
|
134
140
|
*/
|
|
135
141
|
export function setupTerminalServer(httpServer, base = '/', branch = 'unknown') {
|
|
136
|
-
if (!pty) {
|
|
137
|
-
console.warn('[storyboard] node-pty not available — terminal widgets disabled')
|
|
142
|
+
if (!pty || !WebSocketServer) {
|
|
143
|
+
if (!pty) console.warn('[storyboard] node-pty not available — terminal widgets disabled')
|
|
144
|
+
if (!WebSocketServer) console.warn('[storyboard] ws not available — terminal widgets disabled')
|
|
138
145
|
return
|
|
139
146
|
}
|
|
140
147
|
|