@automerge/automerge-repo-network-websocket 1.0.16 → 1.0.17

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/README.md CHANGED
@@ -81,7 +81,7 @@ peer_id = str
81
81
  protocol_version = "1"
82
82
  ; The bytes of an automerge sync message
83
83
  sync_message = bstr
84
- ; The base64 encoded bytes of a document ID
84
+ ; The base58check encoded bytes of a document ID
85
85
  document_id = str
86
86
  ```
87
87
 
@@ -1 +1 @@
1
- {"version":3,"file":"BrowserWebSocketClientAdapter.d.ts","sourceRoot":"","sources":["../src/BrowserWebSocketClientAdapter.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAQ,MAAM,2BAA2B,CAAA;AACxE,OAAO,SAAS,MAAM,eAAe,CAAA;AAIrC,OAAO,EACL,iBAAiB,EAGlB,MAAM,eAAe,CAAA;AAMtB,uBAAe,uBAAwB,SAAQ,cAAc;IAC3D,MAAM,CAAC,EAAE,SAAS,CAAA;CACnB;AAED,qBAAa,6BAA8B,SAAQ,uBAAuB;;IAGxE,OAAO,CAAC,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,CAAA;IACvC,YAAY,CAAC,EAAE,MAAM,CAAA;IAGrB,GAAG,EAAE,MAAM,CAAA;gBAEC,GAAG,EAAE,MAAM;IAKvB,OAAO,CAAC,MAAM,EAAE,MAAM;IAkCtB,MAAM,aAKL;IAGD,OAAO,aAYN;IAED,SAAS,UAAW,sBAAsB,UAEzC;IAED,IAAI;IAWJ,UAAU;IAOV,IAAI,CAAC,OAAO,EAAE,iBAAiB;IAwB/B,kBAAkB,CAAC,MAAM,EAAE,MAAM;IAcjC,cAAc,CAAC,OAAO,EAAE,UAAU;CA6BnC"}
1
+ {"version":3,"file":"BrowserWebSocketClientAdapter.d.ts","sourceRoot":"","sources":["../src/BrowserWebSocketClientAdapter.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAQ,MAAM,2BAA2B,CAAA;AACxE,OAAO,SAAS,MAAM,eAAe,CAAA;AAIrC,OAAO,EACL,iBAAiB,EAGlB,MAAM,eAAe,CAAA;AAKtB,uBAAe,uBAAwB,SAAQ,cAAc;IAC3D,MAAM,CAAC,EAAE,SAAS,CAAA;CACnB;AAED,qBAAa,6BAA8B,SAAQ,uBAAuB;;IAGxE,OAAO,CAAC,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,CAAA;IACvC,YAAY,CAAC,EAAE,MAAM,CAAA;IAGrB,GAAG,EAAE,MAAM,CAAA;gBAEC,GAAG,EAAE,MAAM;IAKvB,OAAO,CAAC,MAAM,EAAE,MAAM;IAkCtB,MAAM,aAKL;IAGD,OAAO,aAYN;IAED,SAAS,UAAW,sBAAsB,UAEzC;IAED,IAAI;IAWJ,UAAU;IAOV,IAAI,CAAC,OAAO,EAAE,iBAAiB;IAwB/B,kBAAkB,CAAC,MAAM,EAAE,MAAM;IAcjC,cAAc,CAAC,OAAO,EAAE,UAAU;CA0BnC"}
@@ -2,7 +2,6 @@ import { NetworkAdapter, cbor } from "@automerge/automerge-repo";
2
2
  import WebSocket from "isomorphic-ws";
3
3
  import debug from "debug";
4
4
  import { ProtocolV1 } from "./protocolVersion.js";
5
- import { isValidRepoMessage } from "@automerge/automerge-repo";
6
5
  const log = debug("WebsocketClient");
7
6
  class WebSocketNetworkAdapter extends NetworkAdapter {
8
7
  socket;
@@ -132,9 +131,6 @@ export class BrowserWebSocketClientAdapter extends WebSocketNetworkAdapter {
132
131
  log(`error: ${decoded.message}`);
133
132
  break;
134
133
  default:
135
- if (!isValidRepoMessage(decoded)) {
136
- throw new Error("Invalid message received");
137
- }
138
134
  this.emit("message", decoded);
139
135
  }
140
136
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automerge/automerge-repo-network-websocket",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "isomorphic node/browser Websocket network adapter for Automerge Repo",
5
5
  "peerDependencies": {
6
6
  "@automerge/automerge": "^2.1.0"
@@ -16,7 +16,7 @@
16
16
  "test": "vitest"
17
17
  },
18
18
  "dependencies": {
19
- "@automerge/automerge-repo": "^1.0.16",
19
+ "@automerge/automerge-repo": "^1.0.17",
20
20
  "cbor-x": "^1.3.0",
21
21
  "eventemitter3": "^5.0.1",
22
22
  "isomorphic-ws": "^5.0.0",
@@ -33,5 +33,5 @@
33
33
  "publishConfig": {
34
34
  "access": "public"
35
35
  },
36
- "gitHead": "d8334e6a3c2a8eb980fc78511c3d9672009cd6cb"
36
+ "gitHead": "657e5fc1aaf4d7392934c30805ff9d16a2997d03"
37
37
  }
@@ -9,7 +9,6 @@ import {
9
9
  JoinMessage,
10
10
  } from "./messages.js"
11
11
  import { ProtocolV1 } from "./protocolVersion.js"
12
- import { isValidRepoMessage } from "@automerge/automerge-repo"
13
12
 
14
13
  const log = debug("WebsocketClient")
15
14
 
@@ -170,9 +169,6 @@ export class BrowserWebSocketClientAdapter extends WebSocketNetworkAdapter {
170
169
  log(`error: ${decoded.message}`)
171
170
  break
172
171
  default:
173
- if (!isValidRepoMessage(decoded)) {
174
- throw new Error("Invalid message received")
175
- }
176
172
  this.emit("message", decoded)
177
173
  }
178
174
  }