@pluv/platform-pluv 0.30.0 → 0.30.1

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.30.0 build /home/runner/work/pluv/pluv/packages/platform-pluv
2
+ > @pluv/platform-pluv@0.30.1 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 3.57 KB
12
- ESM ⚡️ Build success in 61ms
13
- CJS dist/index.js 4.75 KB
14
- CJS ⚡️ Build success in 59ms
11
+ ESM dist/index.mjs 3.65 KB
12
+ ESM ⚡️ Build success in 55ms
13
+ CJS dist/index.js 4.83 KB
14
+ CJS ⚡️ Build success in 57ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 6690ms
17
- DTS dist/index.d.mts 2.24 KB
18
- DTS dist/index.d.ts 2.24 KB
16
+ DTS ⚡️ Build success in 6682ms
17
+ DTS dist/index.d.mts 2.29 KB
18
+ DTS dist/index.d.ts 2.29 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @pluv/platform-pluv
2
2
 
3
+ ## 0.30.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 47784d5: Add missing `publicKey` param to `createIO`.
8
+ - Updated dependencies [b9c3633]
9
+ - @pluv/io@0.30.1
10
+ - @pluv/crdt@0.30.1
11
+ - @pluv/types@0.30.1
12
+
3
13
  ## 0.30.0
4
14
 
5
15
  ### Minor Changes
package/dist/index.d.mts CHANGED
@@ -28,6 +28,7 @@ type PluvIOConfig<TUser extends BaseUser> = Partial<Pick<PluvIOListeners<PluvPla
28
28
  };
29
29
  basePath: string;
30
30
  getInitialStorage?: GetInitialStorageFn<PluvPlatform>;
31
+ publicKey: string;
31
32
  secretKey: string;
32
33
  };
33
34
  declare class PluvIO<TUser extends BaseUser> {
@@ -35,6 +36,7 @@ declare class PluvIO<TUser extends BaseUser> {
35
36
  private readonly _basePath;
36
37
  private readonly _getInitialStorage?;
37
38
  private readonly _listeners;
39
+ private readonly _publicKey;
38
40
  private readonly _secretKey;
39
41
  get fetch(): (request: Request, Env?: unknown, executionCtx?: hono.ExecutionContext) => Response | Promise<Response>;
40
42
  get handler(): (req: Request, requestContext: hono_types.FetchEventLike) => Response | Promise<Response>;
package/dist/index.d.ts CHANGED
@@ -28,6 +28,7 @@ type PluvIOConfig<TUser extends BaseUser> = Partial<Pick<PluvIOListeners<PluvPla
28
28
  };
29
29
  basePath: string;
30
30
  getInitialStorage?: GetInitialStorageFn<PluvPlatform>;
31
+ publicKey: string;
31
32
  secretKey: string;
32
33
  };
33
34
  declare class PluvIO<TUser extends BaseUser> {
@@ -35,6 +36,7 @@ declare class PluvIO<TUser extends BaseUser> {
35
36
  private readonly _basePath;
36
37
  private readonly _getInitialStorage?;
37
38
  private readonly _listeners;
39
+ private readonly _publicKey;
38
40
  private readonly _secretKey;
39
41
  get fetch(): (request: Request, Env?: unknown, executionCtx?: hono.ExecutionContext) => Response | Promise<Response>;
40
42
  get handler(): (req: Request, requestContext: hono_types.FetchEventLike) => Response | Promise<Response>;
package/dist/index.js CHANGED
@@ -90,7 +90,7 @@ var PluvIO = class {
90
90
  return c.json({ data: { ok: true } }, 200);
91
91
  }
92
92
  }));
93
- const { authorize, basePath, onRoomDeleted, getInitialStorage, secretKey } = options;
93
+ const { authorize, basePath, onRoomDeleted, getInitialStorage, publicKey, secretKey } = options;
94
94
  this._authorize = {
95
95
  required: true,
96
96
  secret: "",
@@ -99,6 +99,7 @@ var PluvIO = class {
99
99
  this._basePath = basePath;
100
100
  this._getInitialStorage = getInitialStorage;
101
101
  this._listeners = { onRoomDeleted: (event) => onRoomDeleted == null ? void 0 : onRoomDeleted(event) };
102
+ this._publicKey = publicKey;
102
103
  this._secretKey = secretKey;
103
104
  }
104
105
  get fetch() {
@@ -118,6 +119,7 @@ var PluvIO = class {
118
119
  body: JSON.stringify({
119
120
  maxAge: (_a = params.maxAge) != null ? _a : null,
120
121
  room: params.room,
122
+ publicKey: this._publicKey,
121
123
  secretKey: this._secretKey,
122
124
  user: parsed
123
125
  })
package/dist/index.mjs CHANGED
@@ -65,7 +65,7 @@ var PluvIO = class {
65
65
  return c.json({ data: { ok: true } }, 200);
66
66
  }
67
67
  }));
68
- const { authorize, basePath, onRoomDeleted, getInitialStorage, secretKey } = options;
68
+ const { authorize, basePath, onRoomDeleted, getInitialStorage, publicKey, secretKey } = options;
69
69
  this._authorize = {
70
70
  required: true,
71
71
  secret: "",
@@ -74,6 +74,7 @@ var PluvIO = class {
74
74
  this._basePath = basePath;
75
75
  this._getInitialStorage = getInitialStorage;
76
76
  this._listeners = { onRoomDeleted: (event) => onRoomDeleted == null ? void 0 : onRoomDeleted(event) };
77
+ this._publicKey = publicKey;
77
78
  this._secretKey = secretKey;
78
79
  }
79
80
  get fetch() {
@@ -93,6 +94,7 @@ var PluvIO = class {
93
94
  body: JSON.stringify({
94
95
  maxAge: (_a = params.maxAge) != null ? _a : null,
95
96
  room: params.room,
97
+ publicKey: this._publicKey,
96
98
  secretKey: this._secretKey,
97
99
  user: parsed
98
100
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluv/platform-pluv",
3
- "version": "0.30.0",
3
+ "version": "0.30.1",
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.5.5",
21
21
  "hono": "^4.6.3",
22
22
  "zod": "^3.23.8",
23
- "@pluv/types": "^0.30.0",
24
- "@pluv/io": "^0.30.0",
25
- "@pluv/crdt": "^0.30.0"
23
+ "@pluv/crdt": "^0.30.1",
24
+ "@pluv/io": "^0.30.1",
25
+ "@pluv/types": "^0.30.1"
26
26
  },
27
27
  "devDependencies": {
28
28
  "eslint": "^8.57.0",
29
29
  "tsup": "^8.3.0",
30
30
  "typescript": "^5.6.2",
31
- "@pluv/tsconfig": "^0.30.0",
32
- "eslint-config-pluv": "^0.30.0"
31
+ "@pluv/tsconfig": "^0.30.1",
32
+ "eslint-config-pluv": "^0.30.1"
33
33
  },
34
34
  "scripts": {
35
35
  "build": "tsup src/index.ts --format esm,cjs --dts",
package/src/PluvIO.ts CHANGED
@@ -19,6 +19,7 @@ export type PluvIOConfig<TUser extends BaseUser> = Partial<
19
19
  };
20
20
  basePath: string;
21
21
  getInitialStorage?: GetInitialStorageFn<PluvPlatform>;
22
+ publicKey: string;
22
23
  secretKey: string;
23
24
  };
24
25
 
@@ -27,6 +28,7 @@ export class PluvIO<TUser extends BaseUser> {
27
28
  private readonly _basePath: string;
28
29
  private readonly _getInitialStorage?: GetInitialStorageFn<PluvPlatform>;
29
30
  private readonly _listeners: Pick<PluvIOListeners<PluvPlatform, PluvAuthorize<TUser>, {}, {}>, "onRoomDeleted">;
31
+ private readonly _publicKey: string;
30
32
  private readonly _secretKey: string;
31
33
 
32
34
  public get fetch() {
@@ -70,7 +72,7 @@ export class PluvIO<TUser extends BaseUser> {
70
72
  });
71
73
 
72
74
  constructor(options: PluvIOConfig<TUser>) {
73
- const { authorize, basePath, onRoomDeleted, getInitialStorage, secretKey } = options;
75
+ const { authorize, basePath, onRoomDeleted, getInitialStorage, publicKey, secretKey } = options;
74
76
 
75
77
  this._authorize = {
76
78
  required: true,
@@ -80,6 +82,7 @@ export class PluvIO<TUser extends BaseUser> {
80
82
  this._basePath = basePath;
81
83
  this._getInitialStorage = getInitialStorage;
82
84
  this._listeners = { onRoomDeleted: (event) => onRoomDeleted?.(event) };
85
+ this._publicKey = publicKey;
83
86
  this._secretKey = secretKey;
84
87
  }
85
88
 
@@ -91,6 +94,7 @@ export class PluvIO<TUser extends BaseUser> {
91
94
  body: JSON.stringify({
92
95
  maxAge: params.maxAge ?? null,
93
96
  room: params.room,
97
+ publicKey: this._publicKey,
94
98
  secretKey: this._secretKey,
95
99
  user: parsed,
96
100
  }),