@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.
- package/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +9 -0
- package/dist/index.d.mts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -2
- package/dist/index.mjs +1 -2
- package/package.json +6 -6
- package/src/PluvPlatform.ts +1 -9
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @pluv/platform-pluv@2.2.
|
|
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
|
[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[32m12.
|
|
12
|
-
[32mESM[39m ⚡️ Build success in
|
|
13
|
-
[32mCJS[39m [1mdist/index.js [22m[32m14.
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in
|
|
11
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m12.42 KB[39m
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 107ms
|
|
13
|
+
[32mCJS[39m [1mdist/index.js [22m[32m14.25 KB[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 108ms
|
|
15
15
|
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
17
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m3.
|
|
18
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m3.
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 6238ms
|
|
17
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m3.65 KB[39m
|
|
18
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m3.65 KB[39m
|
package/CHANGELOG.md
CHANGED
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 =
|
|
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 =
|
|
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.
|
|
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.
|
|
25
|
-
"@pluv/io": "^2.2.
|
|
26
|
-
"@pluv/types": "^2.2.
|
|
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
|
-
"
|
|
33
|
-
"
|
|
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",
|
package/src/PluvPlatform.ts
CHANGED
|
@@ -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 =
|
|
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),
|