overleaf-review 0.1.1 → 0.1.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/dist/cli.js +4 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -87,6 +87,9 @@ var config = {
|
|
|
87
87
|
|
|
88
88
|
// src/overleaf-socket.ts
|
|
89
89
|
import WebSocket from "ws";
|
|
90
|
+
function utf8Decode(binary) {
|
|
91
|
+
return Buffer.from(binary, "latin1").toString("utf8");
|
|
92
|
+
}
|
|
90
93
|
var OverleafSocket = class {
|
|
91
94
|
constructor(baseUrl, cookie, opts = {}) {
|
|
92
95
|
this.baseUrl = baseUrl;
|
|
@@ -164,7 +167,7 @@ var OverleafSocket = class {
|
|
|
164
167
|
);
|
|
165
168
|
});
|
|
166
169
|
});
|
|
167
|
-
this.ws.on("message", (data) => this.onFrame(data.toString()));
|
|
170
|
+
this.ws.on("message", (data) => this.onFrame(utf8Decode(data.toString())));
|
|
168
171
|
const intervalMs = (Number(hbTimeout) || 30) * 800;
|
|
169
172
|
this.heartbeat = setInterval(() => this.send("2::"), intervalMs);
|
|
170
173
|
if (this.debug) console.log("[socket] websocket open");
|
package/package.json
CHANGED