@pluv/client 0.41.4 → 0.41.5

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.5 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
+ ESM dist/index.mjs 55.31 KB
12
+ ESM ⚡️ Build success in 137ms
13
+ CJS dist/index.js 56.63 KB
14
+ CJS ⚡️ Build success in 137ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 3238ms
16
+ DTS ⚡️ Build success in 3213ms
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,13 @@
1
1
  # @pluv/client
2
2
 
3
+ ## 0.41.5
4
+
5
+ ### Patch Changes
6
+
7
+ - b3b7b30: Fix error being thrown about missing wsEndpoint when a public key is provided.
8
+ - @pluv/crdt@0.41.5
9
+ - @pluv/types@0.41.5
10
+
3
11
  ## 0.41.4
4
12
 
5
13
  ### 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 {
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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluv/client",
3
- "version": "0.41.4",
3
+ "version": "0.41.5",
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.5",
22
+ "@pluv/types": "^0.41.5"
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.5",
29
+ "eslint-config-pluv": "^0.41.5"
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;