@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.
- package/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +23 -0
- package/dist/index.js +3 -4
- package/dist/index.mjs +3 -4
- package/package.json +8 -8
- package/src/NodePlatform.ts +2 -4
- package/src/NodeWebSocket.ts +2 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
|
|
2
|
-
> @pluv/platform-node@0.
|
|
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
|
[34mCLI[39m Building entry: src/index.ts
|
|
6
6
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
|
-
[34mCLI[39m tsup v7.
|
|
7
|
+
[34mCLI[39m tsup v7.2.0
|
|
8
8
|
[34mCLI[39m Target: es6
|
|
9
9
|
[34mESM[39m Build start
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m6.
|
|
12
|
-
[32mESM[39m ⚡️ Build success in
|
|
13
|
-
[32mCJS[39m [1mdist/index.js [22m[32m7.
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in
|
|
11
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m6.17 KB[39m
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 160ms
|
|
13
|
+
[32mCJS[39m [1mdist/index.js [22m[32m7.99 KB[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 157ms
|
|
15
15
|
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 11290ms
|
|
17
17
|
[32mDTS[39m [1mdist/index.d.mts [22m[32m2.75 KB[39m
|
|
18
18
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m2.75 KB[39m
|
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
|
-
|
|
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
|
-
|
|
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
|
+
"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.
|
|
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.
|
|
25
|
-
"@pluv/types": "^0.
|
|
23
|
+
"@pluv/io": "^0.10.1",
|
|
24
|
+
"@pluv/types": "^0.10.1"
|
|
26
25
|
},
|
|
27
26
|
"devDependencies": {
|
|
28
|
-
"
|
|
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.
|
|
32
|
-
"eslint-config-pluv": "^0.1
|
|
31
|
+
"@pluv/tsconfig": "^0.10.1",
|
|
32
|
+
"eslint-config-pluv": "^0.8.1"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"ws": "^8.0.0"
|
package/src/NodePlatform.ts
CHANGED
|
@@ -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
|
-
|
|
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> {
|
package/src/NodeWebSocket.ts
CHANGED
|
@@ -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
|
}
|