@pluv/platform-node 0.41.7 → 0.43.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-node@0.41.7 build /home/runner/work/pluv/pluv/packages/platform-node
2
+ > @pluv/platform-node@0.43.0 build /home/runner/work/pluv/pluv/packages/platform-node
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 11.23 KB
12
- CJS ⚡️ Build success in 160ms
13
- ESM dist/index.mjs 9.44 KB
14
- ESM ⚡️ Build success in 164ms
11
+ ESM dist/index.mjs 9.49 KB
12
+ ESM ⚡️ Build success in 126ms
13
+ CJS dist/index.js 11.28 KB
14
+ CJS ⚡️ Build success in 131ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 4979ms
17
- DTS dist/index.d.mts 6.37 KB
18
- DTS dist/index.d.ts 6.37 KB
16
+ DTS ⚡️ Build success in 5479ms
17
+ DTS dist/index.d.mts 6.50 KB
18
+ DTS dist/index.d.ts 6.50 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @pluv/platform-node
2
2
 
3
+ ## 0.43.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 29fe3fc: Update `platformNode` and `platformCloudflare` to be able to configure limits for `PluvIO` (when self-hosted).
8
+ - Updated dependencies [e60a677]
9
+ - Updated dependencies [0063e80]
10
+ - Updated dependencies [244a973]
11
+ - Updated dependencies [4b0fbb3]
12
+ - @pluv/io@0.43.0
13
+ - @pluv/types@0.43.0
14
+
15
+ ## 0.42.0
16
+
17
+ ### Patch Changes
18
+
19
+ - a47e171: Deprecated `createPluvHandler`. Instead, documentation will be provided on how to host pluv.io yourself on Node.js and Cloudflare Workers.
20
+ - Updated dependencies [cf1529a]
21
+ - @pluv/io@0.42.0
22
+ - @pluv/types@0.42.0
23
+
3
24
  ## 0.41.7
4
25
 
5
26
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -110,6 +110,10 @@ interface CreatePluvHandlerResult {
110
110
  handler: RequestHandler;
111
111
  wsHandler: WebSocketHandler;
112
112
  }
113
+ /**
114
+ * @deprecated Instructions will be provided on https://pluv.io on how to host this yourself instead.
115
+ * @date April 27, 2025
116
+ */
113
117
  declare const createPluvHandler: <TPluvServer extends PluvServer<NodePlatform<any>, any, any, any>>(config: CreatePluvHandlerConfig<TPluvServer>) => CreatePluvHandlerResult;
114
118
 
115
119
  declare const identity: <T extends unknown>(x: T) => T;
package/dist/index.d.ts CHANGED
@@ -110,6 +110,10 @@ interface CreatePluvHandlerResult {
110
110
  handler: RequestHandler;
111
111
  wsHandler: WebSocketHandler;
112
112
  }
113
+ /**
114
+ * @deprecated Instructions will be provided on https://pluv.io on how to host this yourself instead.
115
+ * @date April 27, 2025
116
+ */
113
117
  declare const createPluvHandler: <TPluvServer extends PluvServer<NodePlatform<any>, any, any, any>>(config: CreatePluvHandlerConfig<TPluvServer>) => CreatePluvHandlerResult;
114
118
 
115
119
  declare const identity: <T extends unknown>(x: T) => T;
package/dist/index.js CHANGED
@@ -323,7 +323,7 @@ var NodePlatform = class _NodePlatform extends import_io2.AbstractPlatform {
323
323
  return new _NodePlatform({
324
324
  roomContext: config.roomContext,
325
325
  mode: this._config.registrationMode,
326
- persistence: this.persistence,
326
+ persistence: this.persistence.initialize(config.roomContext),
327
327
  pubSub: this.pubSub
328
328
  })._initialize();
329
329
  }
@@ -343,12 +343,13 @@ var NodePlatform = class _NodePlatform extends import_io2.AbstractPlatform {
343
343
 
344
344
  // src/platformNode.ts
345
345
  var platformNode = (config = {}) => {
346
- const { authorize, context, crdt, debug } = config;
346
+ const { authorize, context, crdt, debug, limits } = config;
347
347
  return {
348
348
  authorize,
349
349
  context,
350
350
  crdt,
351
351
  debug,
352
+ limits,
352
353
  platform: new NodePlatform(config)
353
354
  };
354
355
  };
package/dist/index.mjs CHANGED
@@ -288,7 +288,7 @@ var NodePlatform = class _NodePlatform extends AbstractPlatform {
288
288
  return new _NodePlatform({
289
289
  roomContext: config.roomContext,
290
290
  mode: this._config.registrationMode,
291
- persistence: this.persistence,
291
+ persistence: this.persistence.initialize(config.roomContext),
292
292
  pubSub: this.pubSub
293
293
  })._initialize();
294
294
  }
@@ -308,12 +308,13 @@ var NodePlatform = class _NodePlatform extends AbstractPlatform {
308
308
 
309
309
  // src/platformNode.ts
310
310
  var platformNode = (config = {}) => {
311
- const { authorize, context, crdt, debug } = config;
311
+ const { authorize, context, crdt, debug, limits } = config;
312
312
  return {
313
313
  authorize,
314
314
  context,
315
315
  crdt,
316
316
  debug,
317
+ limits,
317
318
  platform: new NodePlatform(config)
318
319
  };
319
320
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluv/platform-node",
3
- "version": "0.41.7",
3
+ "version": "0.43.0",
4
4
  "description": "@pluv/io adapter for node.js",
5
5
  "author": "leedavidcs",
6
6
  "license": "MIT",
@@ -17,19 +17,19 @@
17
17
  "access": "public"
18
18
  },
19
19
  "dependencies": {
20
- "@types/node": "^22.14.1",
20
+ "@types/node": "^22.15.3",
21
21
  "@types/ws": "^8.18.1",
22
22
  "path-to-regexp": "^8.2.0",
23
- "@pluv/io": "^0.41.7",
24
- "@pluv/types": "^0.41.7"
23
+ "@pluv/io": "^0.43.0",
24
+ "@pluv/types": "^0.43.0"
25
25
  },
26
26
  "devDependencies": {
27
- "eslint": "^9.25.0",
27
+ "eslint": "^9.25.1",
28
28
  "tsup": "^8.4.0",
29
29
  "typescript": "^5.8.3",
30
30
  "ws": "^8.18.1",
31
- "@pluv/tsconfig": "^0.41.7",
32
- "eslint-config-pluv": "^0.41.7"
31
+ "@pluv/tsconfig": "^0.43.0",
32
+ "eslint-config-pluv": "^0.43.0"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "ws": "^8.0.0"
@@ -106,7 +106,7 @@ export class NodePlatform<
106
106
  return new NodePlatform({
107
107
  roomContext: config.roomContext,
108
108
  mode: this._config.registrationMode,
109
- persistence: this.persistence,
109
+ persistence: this.persistence.initialize(config.roomContext),
110
110
  pubSub: this.pubSub,
111
111
  } as NodePlatformConfig<TMeta>)._initialize() as this;
112
112
  }
@@ -55,6 +55,10 @@ export interface CreatePluvHandlerResult {
55
55
  wsHandler: WebSocketHandler;
56
56
  }
57
57
 
58
+ /**
59
+ * @deprecated Instructions will be provided on https://pluv.io on how to host this yourself instead.
60
+ * @date April 27, 2025
61
+ */
58
62
  export const createPluvHandler = <TPluvServer extends PluvServer<NodePlatform<any>, any, any, any>>(
59
63
  config: CreatePluvHandlerConfig<TPluvServer>,
60
64
  ): CreatePluvHandlerResult => {
@@ -1,4 +1,4 @@
1
- import type { CreateIOParams, InferInitContextType, PluvContext, PluvIOAuthorize } from "@pluv/io";
1
+ import type { CreateIOParams, InferInitContextType, PluvContext, PluvIOAuthorize, PluvIOLimits } from "@pluv/io";
2
2
  import type { BaseUser, Id, IOAuthorize, Json } from "@pluv/types";
3
3
  import type { NodePlatformConfig } from "./NodePlatform";
4
4
  import { NodePlatform } from "./NodePlatform";
@@ -31,13 +31,14 @@ export const platformNode = <
31
31
  >(
32
32
  config: PlatformNodeCreateIOParams<TMeta, TContext, TUser> = {},
33
33
  ): CreateIOParams<NodePlatform<IOAuthorize<TUser, TContext>, TMeta>, TContext, TUser> => {
34
- const { authorize, context, crdt, debug } = config;
34
+ const { authorize, context, crdt, debug, limits } = config;
35
35
 
36
36
  return {
37
37
  authorize,
38
38
  context,
39
39
  crdt,
40
40
  debug,
41
+ limits,
41
42
  platform: new NodePlatform<IOAuthorize<TUser, TContext>, TMeta>(config),
42
43
  };
43
44
  };