hypha-rpc 0.20.20 → 0.20.21-post1
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/dist/hypha-rpc-websocket.js +12 -1
- package/dist/hypha-rpc-websocket.js.map +1 -1
- package/dist/hypha-rpc-websocket.min.js +1 -1
- package/dist/hypha-rpc-websocket.min.js.map +1 -1
- package/dist/hypha-rpc-websocket.min.mjs +1 -1
- package/dist/hypha-rpc-websocket.min.mjs.map +1 -1
- package/dist/hypha-rpc-websocket.mjs +12 -1
- package/dist/hypha-rpc-websocket.mjs.map +1 -1
- package/package.json +1 -1
- package/src/websocket-client.js +12 -1
|
@@ -4543,7 +4543,7 @@ class WebsocketRPCConnection {
|
|
|
4543
4543
|
|
|
4544
4544
|
websocket.onerror = (event) => {
|
|
4545
4545
|
console.error("WebSocket connection error:", event);
|
|
4546
|
-
reject(new Error(`
|
|
4546
|
+
reject(new Error(`WebSocket connection error: ${event}`));
|
|
4547
4547
|
};
|
|
4548
4548
|
|
|
4549
4549
|
websocket.onclose = (event) => {
|
|
@@ -4666,6 +4666,10 @@ class WebsocketRPCConnection {
|
|
|
4666
4666
|
this._handle_message(event.data);
|
|
4667
4667
|
};
|
|
4668
4668
|
|
|
4669
|
+
this._websocket.onerror = (event) => {
|
|
4670
|
+
console.error("WebSocket connection error:", event);
|
|
4671
|
+
};
|
|
4672
|
+
|
|
4669
4673
|
this._websocket.onclose = this._handle_close.bind(this);
|
|
4670
4674
|
|
|
4671
4675
|
if (this._handle_connected) {
|
|
@@ -5233,6 +5237,12 @@ function setupLocalClient({
|
|
|
5233
5237
|
return;
|
|
5234
5238
|
}
|
|
5235
5239
|
|
|
5240
|
+
class FixedLocalWebSocket extends LocalWebSocket {
|
|
5241
|
+
constructor(url) {
|
|
5242
|
+
// Call the parent class's constructor with fixed values
|
|
5243
|
+
super(url, client_id, workspace);
|
|
5244
|
+
}
|
|
5245
|
+
}
|
|
5236
5246
|
connectToServer({
|
|
5237
5247
|
server_url,
|
|
5238
5248
|
workspace,
|
|
@@ -5240,6 +5250,7 @@ function setupLocalClient({
|
|
|
5240
5250
|
token,
|
|
5241
5251
|
method_timeout,
|
|
5242
5252
|
name,
|
|
5253
|
+
WebSocketClass: FixedLocalWebSocket,
|
|
5243
5254
|
}).then(async (server) => {
|
|
5244
5255
|
globalThis.api = server;
|
|
5245
5256
|
try {
|