@pluv/platform-pluv 0.32.7 → 0.32.9

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/platform-pluv@0.32.7 build /home/runner/work/pluv/pluv/packages/platform-pluv
2
+ > @pluv/platform-pluv@0.32.9 build /home/runner/work/pluv/pluv/packages/platform-pluv
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 8.84 KB
12
- ESM ⚡️ Build success in 78ms
13
- CJS dist/index.js 9.74 KB
14
- CJS ⚡️ Build success in 80ms
11
+ ESM dist/index.mjs 8.85 KB
12
+ ESM ⚡️ Build success in 71ms
13
+ CJS dist/index.js 9.75 KB
14
+ CJS ⚡️ Build success in 71ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 6515ms
16
+ DTS ⚡️ Build success in 6059ms
17
17
  DTS dist/index.d.mts 6.99 KB
18
18
  DTS dist/index.d.ts 6.99 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @pluv/platform-pluv
2
2
 
3
+ ## 0.32.9
4
+
5
+ ### Patch Changes
6
+
7
+ - @pluv/crdt@0.32.9
8
+ - @pluv/io@0.32.9
9
+ - @pluv/types@0.32.9
10
+
11
+ ## 0.32.8
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [e659f8a]
16
+ - @pluv/io@0.32.8
17
+ - @pluv/crdt@0.32.8
18
+ - @pluv/types@0.32.8
19
+
3
20
  ## 0.32.7
4
21
 
5
22
  ### Patch Changes
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.7",
3
+ "version": "0.32.9",
4
4
  "description": "@pluv/io adapter for pluv.io",
5
5
  "author": "leedavidcs",
6
6
  "license": "MIT",
@@ -17,19 +17,19 @@
17
17
  "access": "public"
18
18
  },
19
19
  "dependencies": {
20
- "@types/node": "^22.8.1",
21
- "hono": "^4.6.7",
20
+ "@types/node": "^22.8.4",
21
+ "hono": "^4.6.8",
22
22
  "zod": "^3.23.8",
23
- "@pluv/crdt": "^0.32.7",
24
- "@pluv/io": "^0.32.7",
25
- "@pluv/types": "^0.32.7"
23
+ "@pluv/crdt": "^0.32.9",
24
+ "@pluv/io": "^0.32.9",
25
+ "@pluv/types": "^0.32.9"
26
26
  },
27
27
  "devDependencies": {
28
28
  "eslint": "^8.57.0",
29
29
  "tsup": "^8.3.5",
30
30
  "typescript": "^5.6.3",
31
- "eslint-config-pluv": "^0.32.7",
32
- "@pluv/tsconfig": "^0.32.7"
31
+ "@pluv/tsconfig": "^0.32.9",
32
+ "eslint-config-pluv": "^0.32.9"
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 = typeof room === "string" ? ((await this._getInitialStorage?.({ room })) ?? null) : null;
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
  }