@pluv/platform-node 0.3.4 → 0.10.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.
@@ -1,18 +1,18 @@
1
1
 
2
- > @pluv/platform-node@0.3.4 build /home/runner/work/pluv/pluv/packages/platform-node
2
+ > @pluv/platform-node@0.10.1 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
6
6
  CLI Using tsconfig: tsconfig.json
7
- CLI tsup v7.1.0
7
+ CLI tsup v7.2.0
8
8
  CLI Target: es6
9
9
  ESM Build start
10
10
  CJS Build start
11
- ESM dist/index.mjs 6.16 KB
12
- ESM ⚡️ Build success in 149ms
13
- CJS dist/index.js 7.98 KB
14
- CJS ⚡️ Build success in 154ms
11
+ ESM dist/index.mjs 6.17 KB
12
+ ESM ⚡️ Build success in 160ms
13
+ CJS dist/index.js 7.99 KB
14
+ CJS ⚡️ Build success in 157ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 8459ms
16
+ DTS ⚡️ Build success in 11290ms
17
17
  DTS dist/index.d.mts 2.75 KB
18
18
  DTS dist/index.d.ts 2.75 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @pluv/platform-node
2
2
 
3
+ ## 0.10.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 0eeb67c: Passed through sessionId and userId into platform websockets.
8
+ - 885835d: remove unnecessary dependency
9
+ - Updated dependencies [0eeb67c]
10
+ - Updated dependencies [885835d]
11
+ - @pluv/io@0.10.1
12
+ - @pluv/types@0.10.1
13
+
14
+ ## 0.10.0
15
+
16
+ ### Minor Changes
17
+
18
+ - f43f1cc: Change packages to all be versioned together for consistency.
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies [f43f1cc]
23
+ - @pluv/io@0.10.0
24
+ - @pluv/types@0.10.0
25
+
3
26
  ## 0.3.4
4
27
 
5
28
  ### Patch Changes
package/dist/index.js CHANGED
@@ -157,8 +157,8 @@ var import_util = require("util");
157
157
  var import_io = require("@pluv/io");
158
158
  var NodeWebSocket = class extends import_io.AbstractWebSocket {
159
159
  constructor(webSocket, config) {
160
- const { room } = config;
161
- super({ room });
160
+ const { room, sessionId, userId } = config;
161
+ super({ room, sessionId, userId });
162
162
  this.webSocket = webSocket;
163
163
  }
164
164
  get readyState() {
@@ -231,8 +231,7 @@ var NodePlatform = class extends import_io2.AbstractPlatform {
231
231
  super(persistance && pubSub ? { persistance, pubSub } : {});
232
232
  }
233
233
  convertWebSocket(webSocket, config) {
234
- const { room } = config;
235
- return new NodeWebSocket(webSocket, { room });
234
+ return new NodeWebSocket(webSocket, config);
236
235
  }
237
236
  parseData(data) {
238
237
  if (typeof data === "string")
package/dist/index.mjs CHANGED
@@ -121,8 +121,8 @@ import { TextDecoder } from "util";
121
121
  import { AbstractWebSocket } from "@pluv/io";
122
122
  var NodeWebSocket = class extends AbstractWebSocket {
123
123
  constructor(webSocket, config) {
124
- const { room } = config;
125
- super({ room });
124
+ const { room, sessionId, userId } = config;
125
+ super({ room, sessionId, userId });
126
126
  this.webSocket = webSocket;
127
127
  }
128
128
  get readyState() {
@@ -195,8 +195,7 @@ var NodePlatform = class extends AbstractPlatform {
195
195
  super(persistance && pubSub ? { persistance, pubSub } : {});
196
196
  }
197
197
  convertWebSocket(webSocket, config) {
198
- const { room } = config;
199
- return new NodeWebSocket(webSocket, { room });
198
+ return new NodeWebSocket(webSocket, config);
200
199
  }
201
200
  parseData(data) {
202
201
  if (typeof data === "string")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluv/platform-node",
3
- "version": "0.3.4",
3
+ "version": "0.10.1",
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": "^20.4.2",
21
- "@types/react": "^18.2.15",
20
+ "@types/node": "^20.5.0",
22
21
  "@types/ws": "^8.5.5",
23
22
  "path-to-regexp": "^6.2.1",
24
- "@pluv/io": "^0.7.2",
25
- "@pluv/types": "^0.2.2"
23
+ "@pluv/io": "^0.10.1",
24
+ "@pluv/types": "^0.10.1"
26
25
  },
27
26
  "devDependencies": {
28
- "tsup": "^7.1.0",
27
+ "eslint": "^8.47.0",
28
+ "tsup": "^7.2.0",
29
29
  "typescript": "^5.1.6",
30
30
  "ws": "^8.13.0",
31
- "@pluv/tsconfig": "^0.2.0",
32
- "eslint-config-pluv": "^0.1.14"
31
+ "@pluv/tsconfig": "^0.10.1",
32
+ "eslint-config-pluv": "^0.8.1"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "ws": "^8.0.0"
@@ -1,10 +1,10 @@
1
1
  import type { AbstractPersistance, ConvertWebSocketConfig } from "@pluv/io";
2
2
  import { AbstractPlatform, AbstractPubSub } from "@pluv/io";
3
3
  import crypto from "crypto";
4
+ import { IncomingMessage } from "http";
4
5
  import { TextDecoder } from "util";
5
6
  import type { WebSocket } from "ws";
6
7
  import { NodeWebSocket } from "./NodeWebSocket";
7
- import { IncomingMessage, ServerResponse } from "http";
8
8
 
9
9
  export type NodePlatformOptions =
10
10
  | { persistance?: undefined; pubSub?: undefined }
@@ -27,9 +27,7 @@ export class NodePlatform extends AbstractPlatform<
27
27
  webSocket: WebSocket,
28
28
  config: ConvertWebSocketConfig,
29
29
  ): NodeWebSocket {
30
- const { room } = config;
31
-
32
- return new NodeWebSocket(webSocket, { room });
30
+ return new NodeWebSocket(webSocket, config);
33
31
  }
34
32
 
35
33
  public parseData(data: string | ArrayBuffer): Record<string, any> {
@@ -25,9 +25,9 @@ export class NodeWebSocket extends AbstractWebSocket {
25
25
  }
26
26
 
27
27
  constructor(webSocket: WebSocket, config: NodeWebSocketConfig) {
28
- const { room } = config;
28
+ const { room, sessionId, userId } = config;
29
29
 
30
- super({ room });
30
+ super({ room, sessionId, userId });
31
31
 
32
32
  this.webSocket = webSocket;
33
33
  }