@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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @pluv/platform-pluv@3.1.7 build /home/runner/work/pluv/pluv/packages/platform-pluv
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
  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
- CJS dist/index.js 16.87 KB
12
- CJS ⚡️ Build success in 128ms
13
- ESM dist/index.mjs 15.03 KB
14
- ESM ⚡️ Build success in 130ms
11
+ ESM dist/index.mjs 15.14 KB
12
+ ESM ⚡️ Build success in 132ms
13
+ CJS dist/index.js 16.97 KB
14
+ CJS ⚡️ Build success in 132ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 6343ms
17
- DTS dist/index.d.mts 4.02 KB
18
- DTS dist/index.d.ts 4.02 KB
16
+ DTS ⚡️ Build success in 5928ms
17
+ DTS dist/index.d.mts 4.07 KB
18
+ DTS dist/index.d.ts 4.07 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @pluv/platform-pluv
2
2
 
3
+ ## 3.2.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [6d2b257]
8
+ - @pluv/io@3.2.0
9
+ - @pluv/crdt@3.2.0
10
+ - @pluv/types@3.2.0
11
+
3
12
  ## 3.1.7
4
13
 
5
14
  ### Patch Changes
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 typeof this._context === "function" ? this._context(this._roomContext) : this._context;
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 typeof this._context === "function" ? this._context(this._roomContext) : this._context;
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.1.7",
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.21",
20
+ "@types/node": "^22.15.30",
21
21
  "fast-json-stable-stringify": "^2.1.0",
22
- "hono": "^4.7.10",
23
- "zod": "^3.25.17",
24
- "@pluv/crdt": "^3.1.7",
25
- "@pluv/io": "^3.1.7",
26
- "@pluv/types": "^3.1.7"
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.27.0",
29
+ "eslint": "^9.28.0",
30
30
  "tsup": "^8.5.0",
31
31
  "typescript": "^5.8.3",
32
- "@pluv/tsconfig": "^3.1.7",
33
- "eslint-config-pluv": "^3.1.7"
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",
@@ -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";