@pluv/platform-pluv 0.32.7 → 0.32.8
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 +9 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +6 -6
- package/src/PluvIO.ts +6 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @pluv/platform-pluv@0.32.
|
|
2
|
+
> @pluv/platform-pluv@0.32.8 build /home/runner/work/pluv/pluv/packages/platform-pluv
|
|
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[32m8.
|
|
12
|
-
[32mESM[39m ⚡️ Build success in
|
|
13
|
-
[32mCJS[39m [1mdist/index.js [22m[32m9.
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in
|
|
11
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m8.85 KB[39m
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 105ms
|
|
13
|
+
[32mCJS[39m [1mdist/index.js [22m[32m9.75 KB[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 106ms
|
|
15
15
|
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 6280ms
|
|
17
17
|
[32mDTS[39m [1mdist/index.d.mts [22m[32m6.99 KB[39m
|
|
18
18
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m6.99 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -40,7 +40,7 @@ type UserDisconnectedEventData<TUser extends BaseUser> = {
|
|
|
40
40
|
user: TUser;
|
|
41
41
|
};
|
|
42
42
|
type PluvIOListeners<TUser extends BaseUser> = {
|
|
43
|
-
getInitialStorage?: GetInitialStorageFn
|
|
43
|
+
getInitialStorage?: GetInitialStorageFn<{}>;
|
|
44
44
|
onRoomDeleted: (event: RoomDeletedMessageEventData) => void;
|
|
45
45
|
onUserConnected: (event: UserConnectedEventData<TUser>) => void;
|
|
46
46
|
onUserDisconnected: (event: UserDisconnectedEventData<TUser>) => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ type UserDisconnectedEventData<TUser extends BaseUser> = {
|
|
|
40
40
|
user: TUser;
|
|
41
41
|
};
|
|
42
42
|
type PluvIOListeners<TUser extends BaseUser> = {
|
|
43
|
-
getInitialStorage?: GetInitialStorageFn
|
|
43
|
+
getInitialStorage?: GetInitialStorageFn<{}>;
|
|
44
44
|
onRoomDeleted: (event: RoomDeletedMessageEventData) => void;
|
|
45
45
|
onUserConnected: (event: UserConnectedEventData<TUser>) => void;
|
|
46
46
|
onUserDisconnected: (event: UserDisconnectedEventData<TUser>) => void;
|
package/dist/index.js
CHANGED
|
@@ -180,7 +180,7 @@ var PluvIO = class {
|
|
|
180
180
|
switch (event) {
|
|
181
181
|
case "initial-storage": {
|
|
182
182
|
const room = data.room;
|
|
183
|
-
const storage = typeof room === "string" ? (_b = yield (_a = this._getInitialStorage) == null ? void 0 : _a.call(this, { room })) != null ? _b : null : null;
|
|
183
|
+
const storage = typeof room === "string" ? (_b = yield (_a = this._getInitialStorage) == null ? void 0 : _a.call(this, { context: {}, room })) != null ? _b : null : null;
|
|
184
184
|
return c.json({ data: { storage } }, 200);
|
|
185
185
|
}
|
|
186
186
|
case "room-deleted": {
|
package/dist/index.mjs
CHANGED
|
@@ -162,7 +162,7 @@ var PluvIO = class {
|
|
|
162
162
|
switch (event) {
|
|
163
163
|
case "initial-storage": {
|
|
164
164
|
const room = data.room;
|
|
165
|
-
const storage = typeof room === "string" ? (_b = yield (_a = this._getInitialStorage) == null ? void 0 : _a.call(this, { room })) != null ? _b : null : null;
|
|
165
|
+
const storage = typeof room === "string" ? (_b = yield (_a = this._getInitialStorage) == null ? void 0 : _a.call(this, { context: {}, room })) != null ? _b : null : null;
|
|
166
166
|
return c.json({ data: { storage } }, 200);
|
|
167
167
|
}
|
|
168
168
|
case "room-deleted": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pluv/platform-pluv",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.8",
|
|
4
4
|
"description": "@pluv/io adapter for pluv.io",
|
|
5
5
|
"author": "leedavidcs",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
"@types/node": "^22.8.1",
|
|
21
21
|
"hono": "^4.6.7",
|
|
22
22
|
"zod": "^3.23.8",
|
|
23
|
-
"@pluv/crdt": "^0.32.
|
|
24
|
-
"@pluv/
|
|
25
|
-
"@pluv/
|
|
23
|
+
"@pluv/crdt": "^0.32.8",
|
|
24
|
+
"@pluv/types": "^0.32.8",
|
|
25
|
+
"@pluv/io": "^0.32.8"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"eslint": "^8.57.0",
|
|
29
29
|
"tsup": "^8.3.5",
|
|
30
30
|
"typescript": "^5.6.3",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
31
|
+
"@pluv/tsconfig": "^0.32.8",
|
|
32
|
+
"eslint-config-pluv": "^0.32.8"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"build": "tsup src/index.ts --format esm,cjs --dts",
|
package/src/PluvIO.ts
CHANGED
|
@@ -35,7 +35,7 @@ type UserDisconnectedEventData<TUser extends BaseUser> = {
|
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
type PluvIOListeners<TUser extends BaseUser> = {
|
|
38
|
-
getInitialStorage?: GetInitialStorageFn
|
|
38
|
+
getInitialStorage?: GetInitialStorageFn<{}>;
|
|
39
39
|
onRoomDeleted: (event: RoomDeletedMessageEventData) => void;
|
|
40
40
|
onUserConnected: (event: UserConnectedEventData<TUser>) => void;
|
|
41
41
|
onUserDisconnected: (event: UserDisconnectedEventData<TUser>) => void;
|
|
@@ -66,7 +66,7 @@ export class PluvIO<TUser extends BaseUser> implements IOLike<PluvAuthorize<TUse
|
|
|
66
66
|
private readonly _authorize: PluvAuthorize<TUser>;
|
|
67
67
|
private readonly _basePath: string;
|
|
68
68
|
private readonly _endpoints: PluvIOEndpoints;
|
|
69
|
-
private readonly _getInitialStorage?: GetInitialStorageFn
|
|
69
|
+
private readonly _getInitialStorage?: GetInitialStorageFn<{}>;
|
|
70
70
|
private readonly _listeners: PluvIOListeners<TUser>;
|
|
71
71
|
private readonly _publicKey: string;
|
|
72
72
|
private readonly _secretKey: string;
|
|
@@ -124,7 +124,10 @@ export class PluvIO<TUser extends BaseUser> implements IOLike<PluvAuthorize<TUse
|
|
|
124
124
|
switch (event) {
|
|
125
125
|
case "initial-storage": {
|
|
126
126
|
const room = data.room;
|
|
127
|
-
const storage =
|
|
127
|
+
const storage =
|
|
128
|
+
typeof room === "string"
|
|
129
|
+
? ((await this._getInitialStorage?.({ context: {}, room })) ?? null)
|
|
130
|
+
: null;
|
|
128
131
|
|
|
129
132
|
return c.json({ data: { storage } }, 200);
|
|
130
133
|
}
|