thebird 1.2.64 → 1.2.65
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/docs/acp-stream.js +4 -2
- package/docs/preview-sw-client.js +0 -2
- package/docs/terminal.js +6 -2
- package/package.json +1 -1
package/docs/acp-stream.js
CHANGED
|
@@ -41,8 +41,10 @@ function wsStream(url) {
|
|
|
41
41
|
});
|
|
42
42
|
ws.addEventListener('error', (e) => {
|
|
43
43
|
window.__debug.acp.wsState = 'error';
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
const errMsg = e?.message || 'WebSocket connection failed';
|
|
45
|
+
window.__debug.acp.wsError = errMsg;
|
|
46
|
+
console.log('[ACP] Connection error:', errMsg);
|
|
47
|
+
rej(new Error(errMsg));
|
|
46
48
|
});
|
|
47
49
|
});
|
|
48
50
|
}
|
package/docs/terminal.js
CHANGED
|
@@ -79,10 +79,14 @@ async function boot() {
|
|
|
79
79
|
bootActor.send({ type: 'IDB_READY' });
|
|
80
80
|
|
|
81
81
|
try {
|
|
82
|
-
|
|
82
|
+
const swPromise = registerPreviewSW();
|
|
83
|
+
const swTimeout = new Promise((_, rej) => setTimeout(() => rej(new Error('SW registration timeout')), 3000));
|
|
84
|
+
await Promise.race([swPromise, swTimeout]);
|
|
83
85
|
bootActor.send({ type: 'SW_READY' });
|
|
84
86
|
} catch (e) {
|
|
85
|
-
|
|
87
|
+
console.log('[terminal] SW error:', e.message);
|
|
88
|
+
window.__debug.sw = window.__debug.sw || {};
|
|
89
|
+
window.__debug.sw.bootError = e.message;
|
|
86
90
|
bootActor.send({ type: 'SW_ERROR' });
|
|
87
91
|
}
|
|
88
92
|
|
package/package.json
CHANGED