@rstreamlabs/webtty 1.6.2 → 1.6.3
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/index.js +9 -3
- package/dist/index.mjs +9 -3
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1881,6 +1881,12 @@ var rstream = $root.rstream = (() => {
|
|
|
1881
1881
|
})();
|
|
1882
1882
|
|
|
1883
1883
|
// src/webtty.ts
|
|
1884
|
+
function getErrorMessage(error) {
|
|
1885
|
+
return error instanceof Error ? error.message : String(error);
|
|
1886
|
+
}
|
|
1887
|
+
function getWebSocketPayload(payload) {
|
|
1888
|
+
return new Uint8Array(payload);
|
|
1889
|
+
}
|
|
1884
1890
|
var WebTTY = class {
|
|
1885
1891
|
ws = null;
|
|
1886
1892
|
connectionState = "preparing";
|
|
@@ -2077,8 +2083,8 @@ var WebTTY = class {
|
|
|
2077
2083
|
this.close("Unexpected data message.");
|
|
2078
2084
|
}
|
|
2079
2085
|
}
|
|
2080
|
-
} catch (
|
|
2081
|
-
this.close(`Failed to decode message: ${
|
|
2086
|
+
} catch (error) {
|
|
2087
|
+
this.close(`Failed to decode message: ${getErrorMessage(error)}`);
|
|
2082
2088
|
}
|
|
2083
2089
|
};
|
|
2084
2090
|
handleClose = () => {
|
|
@@ -2103,7 +2109,7 @@ var WebTTY = class {
|
|
|
2103
2109
|
if (this.connectionState === "preparing" || this.connectionState === "closed")
|
|
2104
2110
|
return;
|
|
2105
2111
|
const buffer = rstream.webtty.protobuf.Message.encode(message).finish();
|
|
2106
|
-
this.ws.send(buffer);
|
|
2112
|
+
this.ws.send(getWebSocketPayload(buffer));
|
|
2107
2113
|
}
|
|
2108
2114
|
/**
|
|
2109
2115
|
* Closes the WebTTY session and fires exactly one of:
|
package/dist/index.mjs
CHANGED
|
@@ -1845,6 +1845,12 @@ var rstream = $root.rstream = (() => {
|
|
|
1845
1845
|
})();
|
|
1846
1846
|
|
|
1847
1847
|
// src/webtty.ts
|
|
1848
|
+
function getErrorMessage(error) {
|
|
1849
|
+
return error instanceof Error ? error.message : String(error);
|
|
1850
|
+
}
|
|
1851
|
+
function getWebSocketPayload(payload) {
|
|
1852
|
+
return new Uint8Array(payload);
|
|
1853
|
+
}
|
|
1848
1854
|
var WebTTY = class {
|
|
1849
1855
|
ws = null;
|
|
1850
1856
|
connectionState = "preparing";
|
|
@@ -2041,8 +2047,8 @@ var WebTTY = class {
|
|
|
2041
2047
|
this.close("Unexpected data message.");
|
|
2042
2048
|
}
|
|
2043
2049
|
}
|
|
2044
|
-
} catch (
|
|
2045
|
-
this.close(`Failed to decode message: ${
|
|
2050
|
+
} catch (error) {
|
|
2051
|
+
this.close(`Failed to decode message: ${getErrorMessage(error)}`);
|
|
2046
2052
|
}
|
|
2047
2053
|
};
|
|
2048
2054
|
handleClose = () => {
|
|
@@ -2067,7 +2073,7 @@ var WebTTY = class {
|
|
|
2067
2073
|
if (this.connectionState === "preparing" || this.connectionState === "closed")
|
|
2068
2074
|
return;
|
|
2069
2075
|
const buffer = rstream.webtty.protobuf.Message.encode(message).finish();
|
|
2070
|
-
this.ws.send(buffer);
|
|
2076
|
+
this.ws.send(getWebSocketPayload(buffer));
|
|
2071
2077
|
}
|
|
2072
2078
|
/**
|
|
2073
2079
|
* Closes the WebTTY session and fires exactly one of:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rstreamlabs/webtty",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.3",
|
|
4
4
|
"description": "Client-side implementation of the rstream WebTTY protocol.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -19,17 +19,17 @@
|
|
|
19
19
|
"type-check": "tsc --noEmit"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@turbo/gen": "^2.
|
|
22
|
+
"@turbo/gen": "^2.9.5",
|
|
23
23
|
"@types/node": "^25",
|
|
24
24
|
"eslint-config": "*",
|
|
25
|
-
"eslint": "9.39.
|
|
26
|
-
"protobufjs-cli": "^2.0.
|
|
25
|
+
"eslint": "9.39.4",
|
|
26
|
+
"protobufjs-cli": "^2.0.1",
|
|
27
27
|
"tsup": "^8.5.1",
|
|
28
28
|
"typescript-config": "*",
|
|
29
29
|
"typescript": "5.9.3"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"protobufjs": "^
|
|
32
|
+
"protobufjs": "^8.0.1"
|
|
33
33
|
},
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public"
|