@pluv/client 3.1.2 → 3.1.4
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 +15 -0
- package/dist/index.js +16 -2
- package/dist/index.mjs +16 -2
- package/package.json +5 -5
- package/src/PluvRoom.ts +18 -4
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @pluv/client@3.1.
|
|
2
|
+
> @pluv/client@3.1.4 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
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m63.
|
|
12
|
-
[32mESM[39m ⚡️ Build success in
|
|
13
|
-
[32mCJS[39m [1mdist/index.js [22m[
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in
|
|
11
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m63.39 KB[39m
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 125ms
|
|
13
|
+
[32mCJS[39m [1mdist/index.js [22m[32m65.12 KB[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 128ms
|
|
15
15
|
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 4570ms
|
|
17
17
|
[32mDTS[39m [1mdist/index.d.mts [22m[32m19.16 KB[39m
|
|
18
18
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m19.16 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @pluv/client
|
|
2
2
|
|
|
3
|
+
## 3.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e443b66: Fixed a case where an empty storage store (e.g. @pluv/addon-indexeddb) would result in an empty initial storage, even when an initial storage was defined.
|
|
8
|
+
- @pluv/crdt@3.1.4
|
|
9
|
+
- @pluv/types@3.1.4
|
|
10
|
+
|
|
11
|
+
## 3.1.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- @pluv/crdt@3.1.3
|
|
16
|
+
- @pluv/types@3.1.3
|
|
17
|
+
|
|
3
18
|
## 3.1.2
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -1141,7 +1141,7 @@ var PluvRoom = class {
|
|
|
1141
1141
|
}
|
|
1142
1142
|
_handleRegisteredMessage(message) {
|
|
1143
1143
|
return __async(this, null, function* () {
|
|
1144
|
-
var _a, _b
|
|
1144
|
+
var _a, _b;
|
|
1145
1145
|
const { connectionId } = message;
|
|
1146
1146
|
const user = message.user;
|
|
1147
1147
|
if (!connectionId) return;
|
|
@@ -1163,7 +1163,21 @@ var PluvRoom = class {
|
|
|
1163
1163
|
const myself = (_b = this._usersManager.myself) != null ? _b : null;
|
|
1164
1164
|
this._stateNotifier.subjects["my-presence"].next(presence);
|
|
1165
1165
|
this._stateNotifier.subjects.myself.next(myself);
|
|
1166
|
-
const update =
|
|
1166
|
+
const update = yield (() => __async(this, null, function* () {
|
|
1167
|
+
if (!!state) {
|
|
1168
|
+
this._logDebug("Retrieving initial state");
|
|
1169
|
+
return this._crdtManager.getInitialState();
|
|
1170
|
+
}
|
|
1171
|
+
const resolved = this._crdtManager.resolveEncodedState(
|
|
1172
|
+
yield this._storageStore.getUpdates()
|
|
1173
|
+
);
|
|
1174
|
+
if (!!resolved) {
|
|
1175
|
+
this._logDebug("Retrieving storage store state");
|
|
1176
|
+
return resolved;
|
|
1177
|
+
}
|
|
1178
|
+
this._logDebug("Retrieving initial state");
|
|
1179
|
+
return this._crdtManager.getInitialState();
|
|
1180
|
+
}))();
|
|
1167
1181
|
this._sendMessage({
|
|
1168
1182
|
type: "$initializeSession",
|
|
1169
1183
|
data: { presence, update }
|
package/dist/index.mjs
CHANGED
|
@@ -1113,7 +1113,7 @@ var PluvRoom = class {
|
|
|
1113
1113
|
}
|
|
1114
1114
|
_handleRegisteredMessage(message) {
|
|
1115
1115
|
return __async(this, null, function* () {
|
|
1116
|
-
var _a, _b
|
|
1116
|
+
var _a, _b;
|
|
1117
1117
|
const { connectionId } = message;
|
|
1118
1118
|
const user = message.user;
|
|
1119
1119
|
if (!connectionId) return;
|
|
@@ -1135,7 +1135,21 @@ var PluvRoom = class {
|
|
|
1135
1135
|
const myself = (_b = this._usersManager.myself) != null ? _b : null;
|
|
1136
1136
|
this._stateNotifier.subjects["my-presence"].next(presence);
|
|
1137
1137
|
this._stateNotifier.subjects.myself.next(myself);
|
|
1138
|
-
const update =
|
|
1138
|
+
const update = yield (() => __async(this, null, function* () {
|
|
1139
|
+
if (!!state) {
|
|
1140
|
+
this._logDebug("Retrieving initial state");
|
|
1141
|
+
return this._crdtManager.getInitialState();
|
|
1142
|
+
}
|
|
1143
|
+
const resolved = this._crdtManager.resolveEncodedState(
|
|
1144
|
+
yield this._storageStore.getUpdates()
|
|
1145
|
+
);
|
|
1146
|
+
if (!!resolved) {
|
|
1147
|
+
this._logDebug("Retrieving storage store state");
|
|
1148
|
+
return resolved;
|
|
1149
|
+
}
|
|
1150
|
+
this._logDebug("Retrieving initial state");
|
|
1151
|
+
return this._crdtManager.getInitialState();
|
|
1152
|
+
}))();
|
|
1139
1153
|
this._sendMessage({
|
|
1140
1154
|
type: "$initializeSession",
|
|
1141
1155
|
data: { presence, update }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pluv/client",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.4",
|
|
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": "^3.1.
|
|
22
|
-
"@pluv/types": "^3.1.
|
|
21
|
+
"@pluv/crdt": "^3.1.4",
|
|
22
|
+
"@pluv/types": "^3.1.4"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"eslint": "^9.27.0",
|
|
26
26
|
"tsup": "^8.5.0",
|
|
27
27
|
"typescript": "^5.8.3",
|
|
28
|
-
"@pluv/tsconfig": "^3.1.
|
|
29
|
-
"eslint-config-pluv": "^3.1.
|
|
28
|
+
"@pluv/tsconfig": "^3.1.4",
|
|
29
|
+
"eslint-config-pluv": "^3.1.4"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"build": "tsup src/index.ts --format esm,cjs --dts",
|
package/src/PluvRoom.ts
CHANGED
|
@@ -1028,10 +1028,24 @@ export class PluvRoom<
|
|
|
1028
1028
|
this._stateNotifier.subjects["my-presence"].next(presence);
|
|
1029
1029
|
this._stateNotifier.subjects.myself.next(myself);
|
|
1030
1030
|
|
|
1031
|
-
const update =
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1031
|
+
const update = await (async () => {
|
|
1032
|
+
if (!!state) {
|
|
1033
|
+
this._logDebug("Retrieving initial state");
|
|
1034
|
+
return this._crdtManager.getInitialState();
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
const resolved = this._crdtManager.resolveEncodedState(
|
|
1038
|
+
await this._storageStore.getUpdates(),
|
|
1039
|
+
);
|
|
1040
|
+
|
|
1041
|
+
if (!!resolved) {
|
|
1042
|
+
this._logDebug("Retrieving storage store state");
|
|
1043
|
+
return resolved;
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
this._logDebug("Retrieving initial state");
|
|
1047
|
+
return this._crdtManager.getInitialState();
|
|
1048
|
+
})();
|
|
1035
1049
|
|
|
1036
1050
|
this._sendMessage({
|
|
1037
1051
|
type: "$initializeSession",
|