@pluv/platform-pluv 3.1.7 → 3.2.0
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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -2
- package/dist/index.mjs +4 -2
- package/package.json +10 -10
- package/src/PluvPlatform.ts +4 -4
- package/src/index.ts +1 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @pluv/platform-pluv@3.
|
|
2
|
+
> @pluv/platform-pluv@3.2.0 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
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
11
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m15.14 KB[39m
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 132ms
|
|
13
|
+
[32mCJS[39m [1mdist/index.js [22m[32m16.97 KB[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 132ms
|
|
15
15
|
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
17
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m4.
|
|
18
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m4.
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 5928ms
|
|
17
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m4.07 KB[39m
|
|
18
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m4.07 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -93,4 +93,4 @@ type PlatformPluvCreateIOParams<TContext extends Record<string, any> = {}, TUser
|
|
|
93
93
|
}>;
|
|
94
94
|
declare const platformPluv: <TContext extends Record<string, any> = {}, TUser extends BaseUser$1 = BaseUser$1, TCrdt extends CrdtLibraryType<any> = CrdtLibraryType<NoopCrdtDocFactory>>(config: PlatformPluvCreateIOParams<TContext, TUser, TCrdt>) => CreateIOParams<PluvPlatform<TContext, TUser>, TContext, TUser, TCrdt>;
|
|
95
95
|
|
|
96
|
-
export { type PlatformPluvCreateIOParams, type PluvIOEndpoints, PluvPlatform, platformPluv };
|
|
96
|
+
export { type PlatformPluvCreateIOParams, type PluvIOEndpoints, PluvPlatform, type PublicKey, type SecretKey, type WebhookSecret, platformPluv };
|
package/dist/index.d.ts
CHANGED
|
@@ -93,4 +93,4 @@ type PlatformPluvCreateIOParams<TContext extends Record<string, any> = {}, TUser
|
|
|
93
93
|
}>;
|
|
94
94
|
declare const platformPluv: <TContext extends Record<string, any> = {}, TUser extends BaseUser$1 = BaseUser$1, TCrdt extends CrdtLibraryType<any> = CrdtLibraryType<NoopCrdtDocFactory>>(config: PlatformPluvCreateIOParams<TContext, TUser, TCrdt>) => CreateIOParams<PluvPlatform<TContext, TUser>, TContext, TUser, TCrdt>;
|
|
95
95
|
|
|
96
|
-
export { type PlatformPluvCreateIOParams, type PluvIOEndpoints, PluvPlatform, platformPluv };
|
|
96
|
+
export { type PlatformPluvCreateIOParams, type PluvIOEndpoints, PluvPlatform, type PublicKey, type SecretKey, type WebhookSecret, platformPluv };
|
package/dist/index.js
CHANGED
|
@@ -322,7 +322,7 @@ var PluvPlatform = class extends import_io.AbstractPlatform {
|
|
|
322
322
|
throw new HttpError("Invalid request", 400);
|
|
323
323
|
}
|
|
324
324
|
const { event, data } = parsed.data;
|
|
325
|
-
const context = this._getContext();
|
|
325
|
+
const context = yield this._getContext();
|
|
326
326
|
switch (event) {
|
|
327
327
|
case "initial-storage": {
|
|
328
328
|
const room = data.room;
|
|
@@ -472,7 +472,9 @@ var PluvPlatform = class extends import_io.AbstractPlatform {
|
|
|
472
472
|
};
|
|
473
473
|
}
|
|
474
474
|
_getContext() {
|
|
475
|
-
return
|
|
475
|
+
return __async(this, null, function* () {
|
|
476
|
+
return typeof this._context === "function" ? yield Promise.resolve(this._context(this._roomContext)) : yield Promise.resolve(this._context);
|
|
477
|
+
});
|
|
476
478
|
}
|
|
477
479
|
_logDebug(...args) {
|
|
478
480
|
if (!this._debug) return;
|
package/dist/index.mjs
CHANGED
|
@@ -292,7 +292,7 @@ var PluvPlatform = class extends AbstractPlatform {
|
|
|
292
292
|
throw new HttpError("Invalid request", 400);
|
|
293
293
|
}
|
|
294
294
|
const { event, data } = parsed.data;
|
|
295
|
-
const context = this._getContext();
|
|
295
|
+
const context = yield this._getContext();
|
|
296
296
|
switch (event) {
|
|
297
297
|
case "initial-storage": {
|
|
298
298
|
const room = data.room;
|
|
@@ -442,7 +442,9 @@ var PluvPlatform = class extends AbstractPlatform {
|
|
|
442
442
|
};
|
|
443
443
|
}
|
|
444
444
|
_getContext() {
|
|
445
|
-
return
|
|
445
|
+
return __async(this, null, function* () {
|
|
446
|
+
return typeof this._context === "function" ? yield Promise.resolve(this._context(this._roomContext)) : yield Promise.resolve(this._context);
|
|
447
|
+
});
|
|
446
448
|
}
|
|
447
449
|
_logDebug(...args) {
|
|
448
450
|
if (!this._debug) return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pluv/platform-pluv",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "@pluv/io adapter for pluv.io",
|
|
5
5
|
"author": "leedavidcs",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,20 +17,20 @@
|
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@types/node": "^22.15.
|
|
20
|
+
"@types/node": "^22.15.30",
|
|
21
21
|
"fast-json-stable-stringify": "^2.1.0",
|
|
22
|
-
"hono": "^4.7.
|
|
23
|
-
"zod": "^3.25.
|
|
24
|
-
"@pluv/crdt": "^3.
|
|
25
|
-
"@pluv/io": "^3.
|
|
26
|
-
"@pluv/types": "^3.
|
|
22
|
+
"hono": "^4.7.11",
|
|
23
|
+
"zod": "^3.25.56",
|
|
24
|
+
"@pluv/crdt": "^3.2.0",
|
|
25
|
+
"@pluv/io": "^3.2.0",
|
|
26
|
+
"@pluv/types": "^3.2.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"eslint": "^9.
|
|
29
|
+
"eslint": "^9.28.0",
|
|
30
30
|
"tsup": "^8.5.0",
|
|
31
31
|
"typescript": "^5.8.3",
|
|
32
|
-
"@pluv/tsconfig": "^3.
|
|
33
|
-
"eslint-config-pluv": "^3.
|
|
32
|
+
"@pluv/tsconfig": "^3.2.0",
|
|
33
|
+
"eslint-config-pluv": "^3.2.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "tsup src/index.ts --format esm,cjs --dts",
|
package/src/PluvPlatform.ts
CHANGED
|
@@ -286,7 +286,7 @@ export class PluvPlatform<
|
|
|
286
286
|
}
|
|
287
287
|
|
|
288
288
|
const { event, data } = parsed.data;
|
|
289
|
-
const context = this._getContext();
|
|
289
|
+
const context = await this._getContext();
|
|
290
290
|
|
|
291
291
|
switch (event) {
|
|
292
292
|
case "initial-storage": {
|
|
@@ -376,10 +376,10 @@ export class PluvPlatform<
|
|
|
376
376
|
}
|
|
377
377
|
});
|
|
378
378
|
|
|
379
|
-
private _getContext(): TContext {
|
|
379
|
+
private async _getContext(): Promise<TContext> {
|
|
380
380
|
return typeof this._context === "function"
|
|
381
|
-
? this._context(this._roomContext as any)
|
|
382
|
-
: this._context;
|
|
381
|
+
? await Promise.resolve(this._context(this._roomContext as any))
|
|
382
|
+
: await Promise.resolve(this._context);
|
|
383
383
|
}
|
|
384
384
|
|
|
385
385
|
private _logDebug(...args: any[]): void {
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { platformPluv } from "./platformPluv";
|
|
2
2
|
export type { PlatformPluvCreateIOParams } from "./platformPluv";
|
|
3
3
|
export { PluvPlatform } from "./PluvPlatform";
|
|
4
|
+
export type { PublicKey, SecretKey, WebhookSecret } from "./PluvPlatform";
|
|
4
5
|
export type { PluvIOEndpoints } from "./types";
|