@pluv/platform-node 0.38.14 → 0.39.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 +5 -5
- package/CHANGELOG.md +17 -0
- package/dist/index.js +3 -3
- package/dist/index.mjs +3 -3
- package/eslint.config.mjs +4 -0
- package/package.json +8 -8
- package/src/createPluvHandler.ts +3 -3
- package/.eslintrc.js +0 -4
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @pluv/platform-node@0.
|
|
2
|
+
> @pluv/platform-node@0.39.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
|
|
@@ -8,11 +8,11 @@
|
|
|
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[32m8.78 KB[39m
|
|
12
|
-
[32mESM[39m ⚡️ Build success in 62ms
|
|
13
11
|
[32mCJS[39m [1mdist/index.js [22m[32m10.56 KB[39m
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in
|
|
12
|
+
[32mCJS[39m ⚡️ Build success in 74ms
|
|
13
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m8.78 KB[39m
|
|
14
|
+
[32mESM[39m ⚡️ Build success in 76ms
|
|
15
15
|
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 5585ms
|
|
17
17
|
[32mDTS[39m [1mdist/index.d.mts [22m[32m5.91 KB[39m
|
|
18
18
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m5.91 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @pluv/platform-node
|
|
2
2
|
|
|
3
|
+
## 0.39.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @pluv/io@0.39.1
|
|
8
|
+
- @pluv/types@0.39.1
|
|
9
|
+
|
|
10
|
+
## 0.39.0
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 78a9c85: Update error codes for invalid websocket connection data to return a 1003 status code instead of 1011.
|
|
15
|
+
- Updated dependencies [fe6e239]
|
|
16
|
+
- Updated dependencies [737d508]
|
|
17
|
+
- @pluv/io@0.39.0
|
|
18
|
+
- @pluv/types@0.39.0
|
|
19
|
+
|
|
3
20
|
## 0.38.14
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -76,15 +76,15 @@ var import_path_to_regexp = require("path-to-regexp");
|
|
|
76
76
|
var import_ws = require("ws");
|
|
77
77
|
var handle = (ws) => ({
|
|
78
78
|
invalidEndpoint: () => {
|
|
79
|
-
ws.close(
|
|
79
|
+
ws.close(1003, "Invalid WebSocket endpoint");
|
|
80
80
|
return { matched: false };
|
|
81
81
|
},
|
|
82
82
|
invalidRoom: () => {
|
|
83
|
-
ws.close(
|
|
83
|
+
ws.close(1003, "Invalid room name");
|
|
84
84
|
return { matched: true };
|
|
85
85
|
},
|
|
86
86
|
invalidToken: () => {
|
|
87
|
-
ws.close(
|
|
87
|
+
ws.close(1003, "Invalid authentication token");
|
|
88
88
|
return { matched: true };
|
|
89
89
|
}
|
|
90
90
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -41,15 +41,15 @@ import { match } from "path-to-regexp";
|
|
|
41
41
|
import { Server as WsServer } from "ws";
|
|
42
42
|
var handle = (ws) => ({
|
|
43
43
|
invalidEndpoint: () => {
|
|
44
|
-
ws.close(
|
|
44
|
+
ws.close(1003, "Invalid WebSocket endpoint");
|
|
45
45
|
return { matched: false };
|
|
46
46
|
},
|
|
47
47
|
invalidRoom: () => {
|
|
48
|
-
ws.close(
|
|
48
|
+
ws.close(1003, "Invalid room name");
|
|
49
49
|
return { matched: true };
|
|
50
50
|
},
|
|
51
51
|
invalidToken: () => {
|
|
52
|
-
ws.close(
|
|
52
|
+
ws.close(1003, "Invalid authentication token");
|
|
53
53
|
return { matched: true };
|
|
54
54
|
}
|
|
55
55
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pluv/platform-node",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.39.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": "^22.14.
|
|
20
|
+
"@types/node": "^22.14.1",
|
|
21
21
|
"@types/ws": "^8.18.1",
|
|
22
22
|
"path-to-regexp": "^8.2.0",
|
|
23
|
-
"@pluv/io": "^0.
|
|
24
|
-
"@pluv/types": "^0.
|
|
23
|
+
"@pluv/io": "^0.39.1",
|
|
24
|
+
"@pluv/types": "^0.39.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"eslint": "^
|
|
27
|
+
"eslint": "^9.24.0",
|
|
28
28
|
"tsup": "^8.4.0",
|
|
29
29
|
"typescript": "^5.8.3",
|
|
30
30
|
"ws": "^8.18.1",
|
|
31
|
-
"@pluv/tsconfig": "^0.
|
|
32
|
-
"eslint-config-pluv": "^0.
|
|
31
|
+
"@pluv/tsconfig": "^0.39.1",
|
|
32
|
+
"eslint-config-pluv": "^0.39.1"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"ws": "^8.0.0"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "tsup src/index.ts --format esm,cjs --dts",
|
|
39
39
|
"dev": "tsup src/index.ts --format esm,cjs --watch --dts",
|
|
40
|
-
"lint": "eslint src/**/*.ts* --fix",
|
|
40
|
+
"lint": "eslint src/**/*.ts* --fix --max-warnings 0",
|
|
41
41
|
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
|
|
42
42
|
}
|
|
43
43
|
}
|
package/src/createPluvHandler.ts
CHANGED
|
@@ -25,17 +25,17 @@ export type CreatePluvHandlerConfig<TPluvServer extends PluvServer<any, any, any
|
|
|
25
25
|
|
|
26
26
|
const handle = (ws: WebSocket) => ({
|
|
27
27
|
invalidEndpoint: () => {
|
|
28
|
-
ws.close(
|
|
28
|
+
ws.close(1003, "Invalid WebSocket endpoint");
|
|
29
29
|
|
|
30
30
|
return { matched: false };
|
|
31
31
|
},
|
|
32
32
|
invalidRoom: () => {
|
|
33
|
-
ws.close(
|
|
33
|
+
ws.close(1003, "Invalid room name");
|
|
34
34
|
|
|
35
35
|
return { matched: true };
|
|
36
36
|
},
|
|
37
37
|
invalidToken: () => {
|
|
38
|
-
ws.close(
|
|
38
|
+
ws.close(1003, "Invalid authentication token");
|
|
39
39
|
|
|
40
40
|
return { matched: true };
|
|
41
41
|
},
|
package/.eslintrc.js
DELETED