@pluv/platform-node 0.37.4 → 0.37.5

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.37.4 build /home/runner/work/pluv/pluv/packages/platform-node
2
+ > @pluv/platform-node@0.37.5 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
- ESM dist/index.mjs 8.72 KB
12
- ESM ⚡️ Build success in 69ms
13
- CJS dist/index.js 10.50 KB
14
- CJS ⚡️ Build success in 81ms
11
+ CJS dist/index.js 10.56 KB
12
+ CJS ⚡️ Build success in 94ms
13
+ ESM dist/index.mjs 8.78 KB
14
+ ESM ⚡️ Build success in 94ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 5616ms
17
- DTS dist/index.d.mts 5.89 KB
18
- DTS dist/index.d.ts 5.89 KB
16
+ DTS ⚡️ Build success in 5777ms
17
+ DTS dist/index.d.mts 5.91 KB
18
+ DTS dist/index.d.ts 5.91 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @pluv/platform-node
2
2
 
3
+ ## 0.37.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [9a9ecee]
8
+ - @pluv/io@0.37.5
9
+ - @pluv/types@0.37.5
10
+
3
11
  ## 0.37.4
4
12
 
5
13
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -81,7 +81,7 @@ declare class NodePlatform<TMeta extends Record<string, Json> = {}> extends Abst
81
81
  initialize(config: AbstractPlatformConfig<NodePlatformRoomContext<TMeta>>): this;
82
82
  parseData(data: string | ArrayBuffer): Record<string, any>;
83
83
  randomUUID(): string;
84
- setSerializedState(webSocket: NodeWebSocket, state: WebSocketSerializedState): void;
84
+ setSerializedState(webSocket: NodeWebSocket, state: WebSocketSerializedState): WebSocketSerializedState;
85
85
  }
86
86
 
87
87
  type AuthorizeFunctionContext<TPluvServer extends PluvServer<any, any, any, any>> = {
package/dist/index.d.ts CHANGED
@@ -81,7 +81,7 @@ declare class NodePlatform<TMeta extends Record<string, Json> = {}> extends Abst
81
81
  initialize(config: AbstractPlatformConfig<NodePlatformRoomContext<TMeta>>): this;
82
82
  parseData(data: string | ArrayBuffer): Record<string, any>;
83
83
  randomUUID(): string;
84
- setSerializedState(webSocket: NodeWebSocket, state: WebSocketSerializedState): void;
84
+ setSerializedState(webSocket: NodeWebSocket, state: WebSocketSerializedState): WebSocketSerializedState;
85
85
  }
86
86
 
87
87
  type AuthorizeFunctionContext<TPluvServer extends PluvServer<any, any, any, any>> = {
package/dist/index.js CHANGED
@@ -281,7 +281,7 @@ var NodePlatform = class _NodePlatform extends import_io2.AbstractPlatform {
281
281
  }
282
282
  convertWebSocket(webSocket, config) {
283
283
  const { room } = config;
284
- return new NodeWebSocket(webSocket, { persistence: this.persistence, room });
284
+ return new NodeWebSocket(webSocket, { persistence: this.persistence, platform: this, room });
285
285
  }
286
286
  getLastPing(webSocket) {
287
287
  return null;
@@ -312,7 +312,8 @@ var NodePlatform = class _NodePlatform extends import_io2.AbstractPlatform {
312
312
  return import_node_crypto2.default.randomUUID();
313
313
  }
314
314
  setSerializedState(webSocket, state) {
315
- return;
315
+ webSocket.state = state;
316
+ return webSocket.state;
316
317
  }
317
318
  };
318
319
 
package/dist/index.mjs CHANGED
@@ -246,7 +246,7 @@ var NodePlatform = class _NodePlatform extends AbstractPlatform {
246
246
  }
247
247
  convertWebSocket(webSocket, config) {
248
248
  const { room } = config;
249
- return new NodeWebSocket(webSocket, { persistence: this.persistence, room });
249
+ return new NodeWebSocket(webSocket, { persistence: this.persistence, platform: this, room });
250
250
  }
251
251
  getLastPing(webSocket) {
252
252
  return null;
@@ -277,7 +277,8 @@ var NodePlatform = class _NodePlatform extends AbstractPlatform {
277
277
  return crypto2.randomUUID();
278
278
  }
279
279
  setSerializedState(webSocket, state) {
280
- return;
280
+ webSocket.state = state;
281
+ return webSocket.state;
281
282
  }
282
283
  };
283
284
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluv/platform-node",
3
- "version": "0.37.4",
3
+ "version": "0.37.5",
4
4
  "description": "@pluv/io adapter for node.js",
5
5
  "author": "leedavidcs",
6
6
  "license": "MIT",
@@ -20,16 +20,16 @@
20
20
  "@types/node": "^22.13.9",
21
21
  "@types/ws": "^8.18.0",
22
22
  "path-to-regexp": "^8.2.0",
23
- "@pluv/io": "^0.37.4",
24
- "@pluv/types": "^0.37.4"
23
+ "@pluv/io": "^0.37.5",
24
+ "@pluv/types": "^0.37.5"
25
25
  },
26
26
  "devDependencies": {
27
27
  "eslint": "^8.57.1",
28
28
  "tsup": "^8.4.0",
29
29
  "typescript": "^5.8.2",
30
30
  "ws": "^8.18.1",
31
- "eslint-config-pluv": "^0.37.4",
32
- "@pluv/tsconfig": "^0.37.4"
31
+ "@pluv/tsconfig": "^0.37.5",
32
+ "eslint-config-pluv": "^0.37.5"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "ws": "^8.0.0"
@@ -80,7 +80,7 @@ export class NodePlatform<TMeta extends Record<string, Json> = {}> extends Abstr
80
80
  public convertWebSocket(webSocket: WebSocket, config: ConvertWebSocketConfig): NodeWebSocket {
81
81
  const { room } = config;
82
82
 
83
- return new NodeWebSocket(webSocket, { persistence: this.persistence, room });
83
+ return new NodeWebSocket(webSocket, { persistence: this.persistence, platform: this, room });
84
84
  }
85
85
 
86
86
  public getLastPing(webSocket: NodeWebSocket): number | null {
@@ -120,7 +120,9 @@ export class NodePlatform<TMeta extends Record<string, Json> = {}> extends Abstr
120
120
  return crypto.randomUUID();
121
121
  }
122
122
 
123
- public setSerializedState(webSocket: NodeWebSocket, state: WebSocketSerializedState): void {
124
- return;
123
+ public setSerializedState(webSocket: NodeWebSocket, state: WebSocketSerializedState): WebSocketSerializedState {
124
+ webSocket.state = state;
125
+
126
+ return webSocket.state;
125
127
  }
126
128
  }