@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.
- package/.turbo/turbo-build.log +6 -6
- package/CHANGELOG.md +16 -0
- package/dist/index.js +2 -6
- package/dist/index.mjs +2 -6
- package/package.json +5 -5
- package/src/PluvRoom.ts +2 -8
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @pluv/client@0.41.
|
|
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
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
[34mCLI[39m Target: es6
|
|
9
9
|
[34mESM[39m Build start
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
11
|
+
[32mCJS[39m [1mdist/index.js [22m[32m56.44 KB[39m
|
|
12
|
+
[32mCJS[39m ⚡️ Build success in 119ms
|
|
13
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m55.12 KB[39m
|
|
14
|
+
[32mESM[39m ⚡️ Build success in 123ms
|
|
15
15
|
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 3299ms
|
|
17
17
|
[32mDTS[39m [1mdist/index.d.mts [22m[32m24.58 KB[39m
|
|
18
18
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m24.58 KB[39m
|
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
|
|
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
|
|
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.
|
|
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.
|
|
22
|
-
"@pluv/types": "^0.41.
|
|
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.
|
|
29
|
-
"eslint-config-pluv": "^0.41.
|
|
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
|
|
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();
|