@pluv/platform-node 2.2.0 → 2.2.2
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 +524 -510
- package/dist/index.js +3 -3
- package/dist/index.mjs +7 -7
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -112,7 +112,7 @@ var createPluvHandler = (config) => {
|
|
|
112
112
|
rooms.set(roomId, newRoom);
|
|
113
113
|
return newRoom;
|
|
114
114
|
};
|
|
115
|
-
const wsHandler = (ws, req) => __async(
|
|
115
|
+
const wsHandler = (ws, req) => __async(null, null, function* () {
|
|
116
116
|
var _a;
|
|
117
117
|
const url = req.url;
|
|
118
118
|
const onError = handle(ws);
|
|
@@ -135,11 +135,11 @@ var createPluvHandler = (config) => {
|
|
|
135
135
|
return { matched: true };
|
|
136
136
|
});
|
|
137
137
|
const createWsServer = () => {
|
|
138
|
-
return wsServer.on("connection", (ws, req) => __async(
|
|
138
|
+
return wsServer.on("connection", (ws, req) => __async(null, null, function* () {
|
|
139
139
|
yield wsHandler(ws, req);
|
|
140
140
|
}));
|
|
141
141
|
};
|
|
142
|
-
const handler = (req, res, next) => __async(
|
|
142
|
+
const handler = (req, res, next) => __async(null, null, function* () {
|
|
143
143
|
var _a, _b, _c, _d, _e, _f;
|
|
144
144
|
if (!authorize) return (_a = next == null ? void 0 : next()) != null ? _a : null;
|
|
145
145
|
if (req.method !== "GET") return (_b = next == null ? void 0 : next()) != null ? _b : null;
|
package/dist/index.mjs
CHANGED
|
@@ -39,7 +39,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
// src/createPluvHandler.ts
|
|
42
|
-
import Url from "
|
|
42
|
+
import Url from "url";
|
|
43
43
|
import { match } from "path-to-regexp";
|
|
44
44
|
import { WebSocketServer } from "ws";
|
|
45
45
|
var handle = (ws) => ({
|
|
@@ -77,7 +77,7 @@ var createPluvHandler = (config) => {
|
|
|
77
77
|
rooms.set(roomId, newRoom);
|
|
78
78
|
return newRoom;
|
|
79
79
|
};
|
|
80
|
-
const wsHandler = (ws, req) => __async(
|
|
80
|
+
const wsHandler = (ws, req) => __async(null, null, function* () {
|
|
81
81
|
var _a;
|
|
82
82
|
const url = req.url;
|
|
83
83
|
const onError = handle(ws);
|
|
@@ -100,11 +100,11 @@ var createPluvHandler = (config) => {
|
|
|
100
100
|
return { matched: true };
|
|
101
101
|
});
|
|
102
102
|
const createWsServer = () => {
|
|
103
|
-
return wsServer.on("connection", (ws, req) => __async(
|
|
103
|
+
return wsServer.on("connection", (ws, req) => __async(null, null, function* () {
|
|
104
104
|
yield wsHandler(ws, req);
|
|
105
105
|
}));
|
|
106
106
|
};
|
|
107
|
-
const handler = (req, res, next) => __async(
|
|
107
|
+
const handler = (req, res, next) => __async(null, null, function* () {
|
|
108
108
|
var _a, _b, _c, _d, _e, _f;
|
|
109
109
|
if (!authorize) return (_a = next == null ? void 0 : next()) != null ? _a : null;
|
|
110
110
|
if (req.method !== "GET") return (_b = next == null ? void 0 : next()) != null ? _b : null;
|
|
@@ -148,12 +148,12 @@ var infer = (callback) => callback;
|
|
|
148
148
|
|
|
149
149
|
// src/NodePlatform.ts
|
|
150
150
|
import { AbstractPlatform } from "@pluv/io";
|
|
151
|
-
import crypto2 from "
|
|
152
|
-
import { TextDecoder } from "
|
|
151
|
+
import crypto2 from "crypto";
|
|
152
|
+
import { TextDecoder } from "util";
|
|
153
153
|
|
|
154
154
|
// src/NodeWebSocket.ts
|
|
155
155
|
import { AbstractWebSocket } from "@pluv/io";
|
|
156
|
-
import crypto from "
|
|
156
|
+
import crypto from "crypto";
|
|
157
157
|
var NodeWebSocket = class extends AbstractWebSocket {
|
|
158
158
|
constructor(webSocket, config) {
|
|
159
159
|
const { room } = config;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pluv/platform-node",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
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.15.18",
|
|
21
21
|
"@types/ws": "^8.18.1",
|
|
22
22
|
"path-to-regexp": "^8.2.0",
|
|
23
|
-
"@pluv/io": "^2.2.
|
|
24
|
-
"@pluv/types": "^2.2.
|
|
23
|
+
"@pluv/io": "^2.2.2",
|
|
24
|
+
"@pluv/types": "^2.2.2"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"eslint": "^9.
|
|
28
|
-
"tsup": "^8.
|
|
27
|
+
"eslint": "^9.27.0",
|
|
28
|
+
"tsup": "^8.5.0",
|
|
29
29
|
"typescript": "^5.8.3",
|
|
30
30
|
"ws": "^8.18.2",
|
|
31
|
-
"@pluv/tsconfig": "^2.2.
|
|
32
|
-
"eslint-config-pluv": "^2.2.
|
|
31
|
+
"@pluv/tsconfig": "^2.2.2",
|
|
32
|
+
"eslint-config-pluv": "^2.2.2"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"ws": "^8.0.0"
|