@pluv/client 0.41.4 → 0.41.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @pluv/client@0.41.4 build /home/runner/work/pluv/pluv/packages/client
2
+ > @pluv/client@0.41.6 build /home/runner/work/pluv/pluv/packages/client
3
3
  > tsup src/index.ts --format esm,cjs --dts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -8,11 +8,11 @@
8
8
  CLI Target: es6
9
9
  ESM Build start
10
10
  CJS Build start
11
- ESM dist/index.mjs 55.36 KB
12
- ESM ⚡️ Build success in 130ms
13
- CJS dist/index.js 56.67 KB
14
- CJS ⚡️ Build success in 132ms
11
+ CJS dist/index.js 56.44 KB
12
+ CJS ⚡️ Build success in 119ms
13
+ ESM dist/index.mjs 55.12 KB
14
+ ESM ⚡️ Build success in 123ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 3238ms
16
+ DTS ⚡️ Build success in 3299ms
17
17
  DTS dist/index.d.mts 24.58 KB
18
18
  DTS dist/index.d.ts 24.58 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @pluv/client
2
2
 
3
+ ## 0.41.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 71642fa: Fix error about missing wsEndpoint.
8
+ - @pluv/crdt@0.41.6
9
+ - @pluv/types@0.41.6
10
+
11
+ ## 0.41.5
12
+
13
+ ### Patch Changes
14
+
15
+ - b3b7b30: Fix error being thrown about missing wsEndpoint when a public key is provided.
16
+ - @pluv/crdt@0.41.5
17
+ - @pluv/types@0.41.5
18
+
3
19
  ## 0.41.4
4
20
 
5
21
  ### Patch Changes
package/dist/index.js CHANGED
@@ -762,7 +762,6 @@ var PluvRoom = class extends AbstractRoom {
762
762
  const params = (_a = args[0]) != null ? _a : {};
763
763
  const metadata = params.metadata;
764
764
  this._setMetadata(metadata);
765
- if (!this._endpoints.wsEndpoint) throw new Error("Must provide a wsEndpoint.");
766
765
  const canConnect = ["Closed" /* Closed */, "Untouched" /* Untouched */].some(
767
766
  (state) => this._state.connection.state === state
768
767
  );
@@ -774,7 +773,8 @@ var PluvRoom = class extends AbstractRoom {
774
773
  });
775
774
  yield this._storageStore.initialize();
776
775
  yield this._applyStorageStore();
777
- const url = new URL(this._getWsEndpoint(this.id, params));
776
+ const wsEndpoint = this._getWsEndpoint(this.id, params);
777
+ const url = new URL(wsEndpoint);
778
778
  let authToken = null;
779
779
  let webSocket;
780
780
  try {
@@ -805,7 +805,6 @@ var PluvRoom = class extends AbstractRoom {
805
805
  }
806
806
  disconnect() {
807
807
  return __async(this, null, function* () {
808
- if (!this._endpoints.wsEndpoint) throw new Error("Must provide a wsEndpoint.");
809
808
  if (!this._state.webSocket) return;
810
809
  const canDisconnect = ["Connecting" /* Connecting */, "Open" /* Open */].some(
811
810
  (state) => this._state.connection.state === state
@@ -1321,9 +1320,6 @@ var PluvRoom = class extends AbstractRoom {
1321
1320
  }
1322
1321
  _reconnect() {
1323
1322
  return __async(this, null, function* () {
1324
- if (!this._endpoints.wsEndpoint) {
1325
- throw new Error("Must provide an wsEndpoint.");
1326
- }
1327
1323
  if (!this._state.webSocket) return;
1328
1324
  this._closeWs();
1329
1325
  const metadata = this._lastMetadata;
package/dist/index.mjs CHANGED
@@ -731,7 +731,6 @@ var PluvRoom = class extends AbstractRoom {
731
731
  const params = (_a = args[0]) != null ? _a : {};
732
732
  const metadata = params.metadata;
733
733
  this._setMetadata(metadata);
734
- if (!this._endpoints.wsEndpoint) throw new Error("Must provide a wsEndpoint.");
735
734
  const canConnect = ["Closed" /* Closed */, "Untouched" /* Untouched */].some(
736
735
  (state) => this._state.connection.state === state
737
736
  );
@@ -743,7 +742,8 @@ var PluvRoom = class extends AbstractRoom {
743
742
  });
744
743
  yield this._storageStore.initialize();
745
744
  yield this._applyStorageStore();
746
- const url = new URL(this._getWsEndpoint(this.id, params));
745
+ const wsEndpoint = this._getWsEndpoint(this.id, params);
746
+ const url = new URL(wsEndpoint);
747
747
  let authToken = null;
748
748
  let webSocket;
749
749
  try {
@@ -774,7 +774,6 @@ var PluvRoom = class extends AbstractRoom {
774
774
  }
775
775
  disconnect() {
776
776
  return __async(this, null, function* () {
777
- if (!this._endpoints.wsEndpoint) throw new Error("Must provide a wsEndpoint.");
778
777
  if (!this._state.webSocket) return;
779
778
  const canDisconnect = ["Connecting" /* Connecting */, "Open" /* Open */].some(
780
779
  (state) => this._state.connection.state === state
@@ -1290,9 +1289,6 @@ var PluvRoom = class extends AbstractRoom {
1290
1289
  }
1291
1290
  _reconnect() {
1292
1291
  return __async(this, null, function* () {
1293
- if (!this._endpoints.wsEndpoint) {
1294
- throw new Error("Must provide an wsEndpoint.");
1295
- }
1296
1292
  if (!this._state.webSocket) return;
1297
1293
  this._closeWs();
1298
1294
  const metadata = this._lastMetadata;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluv/client",
3
- "version": "0.41.4",
3
+ "version": "0.41.6",
4
4
  "description": "@pluv/io frontend client",
5
5
  "author": "leedavidcs",
6
6
  "license": "MIT",
@@ -18,15 +18,15 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "wonka": "^6.3.5",
21
- "@pluv/crdt": "^0.41.4",
22
- "@pluv/types": "^0.41.4"
21
+ "@pluv/crdt": "^0.41.6",
22
+ "@pluv/types": "^0.41.6"
23
23
  },
24
24
  "devDependencies": {
25
25
  "eslint": "^9.25.0",
26
26
  "tsup": "^8.4.0",
27
27
  "typescript": "^5.8.3",
28
- "@pluv/tsconfig": "^0.41.4",
29
- "eslint-config-pluv": "^0.41.4"
28
+ "@pluv/tsconfig": "^0.41.6",
29
+ "eslint-config-pluv": "^0.41.6"
30
30
  },
31
31
  "scripts": {
32
32
  "build": "tsup src/index.ts --format esm,cjs --dts",
package/src/PluvRoom.ts CHANGED
@@ -358,8 +358,6 @@ export class PluvRoom<
358
358
 
359
359
  this._setMetadata(metadata);
360
360
 
361
- if (!this._endpoints.wsEndpoint) throw new Error("Must provide a wsEndpoint.");
362
-
363
361
  const canConnect = [ConnectionState.Closed, ConnectionState.Untouched].some(
364
362
  (state) => this._state.connection.state === state,
365
363
  );
@@ -376,7 +374,8 @@ export class PluvRoom<
376
374
  await this._storageStore.initialize();
377
375
  await this._applyStorageStore();
378
376
 
379
- const url = new URL(this._getWsEndpoint(this.id, params));
377
+ const wsEndpoint = this._getWsEndpoint(this.id, params);
378
+ const url = new URL(wsEndpoint);
380
379
 
381
380
  let authToken: string | null = null;
382
381
  let webSocket: WebSocket;
@@ -417,7 +416,6 @@ export class PluvRoom<
417
416
  }
418
417
 
419
418
  public async disconnect(): Promise<void> {
420
- if (!this._endpoints.wsEndpoint) throw new Error("Must provide a wsEndpoint.");
421
419
  if (!this._state.webSocket) return;
422
420
 
423
421
  const canDisconnect = [ConnectionState.Connecting, ConnectionState.Open].some(
@@ -1285,10 +1283,6 @@ export class PluvRoom<
1285
1283
  }
1286
1284
 
1287
1285
  private async _reconnect(): Promise<void> {
1288
- if (!this._endpoints.wsEndpoint) {
1289
- throw new Error("Must provide an wsEndpoint.");
1290
- }
1291
-
1292
1286
  if (!this._state.webSocket) return;
1293
1287
 
1294
1288
  this._closeWs();