portprism 2.0.0 → 2.0.1

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -72810,11 +72810,12 @@ var Agent = class extends EventEmitter4 {
72810
72810
  });
72811
72811
  localWs.on("message", (data, isBinary) => {
72812
72812
  if (this.ws?.readyState !== import_ws2.default.OPEN) return;
72813
+ const binary = typeof isBinary === "boolean" ? isBinary : Buffer.isBuffer(data);
72813
72814
  this.ws.send(JSON.stringify({
72814
72815
  type: "ws-message",
72815
72816
  wsId,
72816
- data: isBinary ? Buffer.from(data).toString("base64") : data.toString(),
72817
- binary: isBinary
72817
+ data: binary ? Buffer.from(data).toString("base64") : data.toString(),
72818
+ binary
72818
72819
  }));
72819
72820
  });
72820
72821
  localWs.on("close", (code, reason) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "portprism",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Share your local server with anyone, instantly.",
5
5
  "type": "module",
6
6
  "bin": {