@pluv/platform-pluv 2.2.0 → 2.2.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@2.2.0 build /home/runner/work/pluv/pluv/packages/platform-pluv
2
+ > @pluv/platform-pluv@2.2.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 12.46 KB
12
- ESM ⚡️ Build success in 83ms
13
- CJS dist/index.js 14.29 KB
14
- CJS ⚡️ Build success in 81ms
11
+ ESM dist/index.mjs 12.42 KB
12
+ ESM ⚡️ Build success in 107ms
13
+ CJS dist/index.js 14.25 KB
14
+ CJS ⚡️ Build success in 108ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 7205ms
17
- DTS dist/index.d.mts 3.67 KB
18
- DTS dist/index.d.ts 3.67 KB
16
+ DTS ⚡️ Build success in 6238ms
17
+ DTS dist/index.d.mts 3.65 KB
18
+ DTS dist/index.d.ts 3.65 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @pluv/platform-pluv
2
2
 
3
+ ## 2.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 6563957: Fix `createToken` throwing a TypeError.
8
+ - @pluv/crdt@2.2.1
9
+ - @pluv/io@2.2.1
10
+ - @pluv/types@2.2.1
11
+
3
12
  ## 2.2.0
4
13
 
5
14
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -57,7 +57,6 @@ declare class PluvPlatform<TContext extends Record<string, any> = {}, TUser exte
57
57
  };
58
58
  readonly _name = "platformPluv";
59
59
  private readonly _app;
60
- private _authorize;
61
60
  private readonly _basePath;
62
61
  private readonly _context;
63
62
  private readonly _endpoints;
package/dist/index.d.ts CHANGED
@@ -57,7 +57,6 @@ declare class PluvPlatform<TContext extends Record<string, any> = {}, TUser exte
57
57
  };
58
58
  readonly _name = "platformPluv";
59
59
  private readonly _app;
60
- private _authorize;
61
60
  private readonly _basePath;
62
61
  private readonly _context;
63
62
  private readonly _endpoints;
package/dist/index.js CHANGED
@@ -238,7 +238,7 @@ var PluvPlatform = class extends import_io.AbstractPlatform {
238
238
  this._name = "platformPluv";
239
239
  this._createToken = (params) => __async(this, null, function* () {
240
240
  var _a;
241
- const parsed = this._authorize.user.parse(params.user);
241
+ const parsed = params.authorize.user.parse(params.user);
242
242
  const [endpoints, publicKey, secretKey] = yield Promise.all([
243
243
  typeof this._endpoints === "object" ? this._endpoints : this._endpoints(),
244
244
  typeof this._publicKey === "string" ? this._publicKey : this._publicKey(),
@@ -386,7 +386,6 @@ var PluvPlatform = class extends import_io.AbstractPlatform {
386
386
  throw new Error("Config `onRoomMessage` is not supported on `platformPluv`");
387
387
  if (!!config.onStorageUpdated)
388
388
  throw new Error("Config `onStorageUpdated` is not supported on `platformPluv`");
389
- this._authorize = config.authorize;
390
389
  this._getInitialStorage = config.getInitialStorage;
391
390
  this._listeners = {
392
391
  onRoomDeleted: (event) => {
package/dist/index.mjs CHANGED
@@ -208,7 +208,7 @@ var PluvPlatform = class extends AbstractPlatform {
208
208
  this._name = "platformPluv";
209
209
  this._createToken = (params) => __async(this, null, function* () {
210
210
  var _a;
211
- const parsed = this._authorize.user.parse(params.user);
211
+ const parsed = params.authorize.user.parse(params.user);
212
212
  const [endpoints, publicKey, secretKey] = yield Promise.all([
213
213
  typeof this._endpoints === "object" ? this._endpoints : this._endpoints(),
214
214
  typeof this._publicKey === "string" ? this._publicKey : this._publicKey(),
@@ -356,7 +356,6 @@ var PluvPlatform = class extends AbstractPlatform {
356
356
  throw new Error("Config `onRoomMessage` is not supported on `platformPluv`");
357
357
  if (!!config.onStorageUpdated)
358
358
  throw new Error("Config `onStorageUpdated` is not supported on `platformPluv`");
359
- this._authorize = config.authorize;
360
359
  this._getInitialStorage = config.getInitialStorage;
361
360
  this._listeners = {
362
361
  onRoomDeleted: (event) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluv/platform-pluv",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "@pluv/io adapter for pluv.io",
5
5
  "author": "leedavidcs",
6
6
  "license": "MIT",
@@ -21,16 +21,16 @@
21
21
  "fast-json-stable-stringify": "^2.1.0",
22
22
  "hono": "^4.7.9",
23
23
  "zod": "^3.24.4",
24
- "@pluv/crdt": "^2.2.0",
25
- "@pluv/io": "^2.2.0",
26
- "@pluv/types": "^2.2.0"
24
+ "@pluv/crdt": "^2.2.1",
25
+ "@pluv/io": "^2.2.1",
26
+ "@pluv/types": "^2.2.1"
27
27
  },
28
28
  "devDependencies": {
29
29
  "eslint": "^9.26.0",
30
30
  "tsup": "^8.4.0",
31
31
  "typescript": "^5.8.3",
32
- "@pluv/tsconfig": "^2.2.0",
33
- "eslint-config-pluv": "^2.2.0"
32
+ "eslint-config-pluv": "^2.2.1",
33
+ "@pluv/tsconfig": "^2.2.1"
34
34
  },
35
35
  "scripts": {
36
36
  "build": "tsup src/index.ts --format esm,cjs --dts",
@@ -81,7 +81,6 @@ export class PluvPlatform<
81
81
  public readonly _name = "platformPluv";
82
82
 
83
83
  private readonly _app: Hono;
84
- private _authorize: any;
85
84
  private readonly _basePath: string;
86
85
  private readonly _context: any;
87
86
  private readonly _endpoints: PluvIOEndpoints | (() => MaybePromise<PluvIOEndpoints>);
@@ -92,7 +91,7 @@ export class PluvPlatform<
92
91
  private readonly _webhookSecret?: WebhookSecret;
93
92
 
94
93
  public _createToken = async (params: JWTEncodeParams<any, any>): Promise<string> => {
95
- const parsed = this._authorize.user.parse(params.user);
94
+ const parsed = params.authorize.user.parse(params.user);
96
95
 
97
96
  const [endpoints, publicKey, secretKey] = await Promise.all([
98
97
  typeof this._endpoints === "object" ? this._endpoints : this._endpoints(),
@@ -192,13 +191,6 @@ export class PluvPlatform<
192
191
  if (!!config.onStorageUpdated)
193
192
  throw new Error("Config `onStorageUpdated` is not supported on `platformPluv`");
194
193
 
195
- /**
196
- * !HACK
197
- * @description Assign these on the validation step, because we know this will happen on the
198
- * server constructor internally.
199
- * @date December 16, 2024
200
- */
201
- this._authorize = config.authorize;
202
194
  this._getInitialStorage = config.getInitialStorage;
203
195
  this._listeners = {
204
196
  onRoomDeleted: (event) => config.onRoomDeleted?.(event),