@interncom/diplomatic 0.0.5 → 0.0.6

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.mjs CHANGED
@@ -8320,7 +8320,11 @@ var DiplomaticClient = class {
8320
8320
  return;
8321
8321
  }
8322
8322
  const url = new URL(hostURL);
8323
- url.protocol = "ws";
8323
+ if (window.location.protocol === "https:") {
8324
+ url.protocol = "wss";
8325
+ } else {
8326
+ url.protocol = "ws";
8327
+ }
8324
8328
  const keyHex = btoh(this.hostKeyPair?.publicKey);
8325
8329
  url.searchParams.set("key", keyHex);
8326
8330
  this.websocket = new WebSocket(url);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interncom/diplomatic",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "type": "module",
5
5
  "description": "Secure sync layer",
6
6
  "main": "dist/index.mjs",