redweb 0.1.2 → 0.1.4

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/.gitattributes ADDED
@@ -0,0 +1,2 @@
1
+ # Auto detect text files and perform LF normalization
2
+ * text=auto
package/HttpServer.js ADDED
@@ -0,0 +1,88 @@
1
+ const express = require('express');
2
+ const bodyParser = require('body-parser');
3
+ const path = require('path');
4
+ const https = require('https');
5
+ const loadSslConfig = require('./sslConfig');
6
+
7
+ /**
8
+ * @typedef {'json' | 'urlencoded'} RedWebEncoding
9
+ */
10
+
11
+ /**
12
+ * RedWeb options object.
13
+ * @typedef {Object} RedWebOptions
14
+ * @property {number} [port=80] - The port number to bind the server.
15
+ * @property {string} [bind='0.0.0.0'] - The bind address for the server.
16
+ * @property {string[]} [publicPaths=['./public']] - An array of paths to serve static files from.
17
+ * @property {Array<{serviceName: string, method: string, function: Function}>} [services=[]] - An array of services with their endpoints and handlers.
18
+ * @property {Function} [listenCallback] - Callback function to execute once the server starts listening.
19
+ * @property {RedWebEncoding} [encoding='json'] - The encoding type for the request bodies ('json' or 'urlencoded').
20
+ * @property {Object} [ssl] - SSL configuration for HTTPS server.
21
+ * @property {string} [ssl.key] - Path to the SSL key file.
22
+ * @property {string} [ssl.cert] - Path to the SSL certificate file.
23
+ */
24
+
25
+ const ENCODINGS = { json: 'json', urlencoded: 'urlencoded' };
26
+ const METHODS = { POST: 'post', GET: 'get' };
27
+
28
+ const HTTP_OPTIONS = {
29
+ port: 80,
30
+ bind: '0.0.0.0',
31
+ publicPaths: ['./public'],
32
+ services: [],
33
+ listenCallback: undefined,
34
+ encoding: ENCODINGS.json,
35
+ ssl: null
36
+ };
37
+
38
+ /**
39
+ * Base HTTP Server
40
+ * @param {RedWebOptions} options - Configuration options for RedWeb.
41
+ * @return {Object} Express application instance.
42
+ */
43
+ function BaseHttpServer(options = {}) {
44
+ this.options = { ...HTTP_OPTIONS, ...options };
45
+ this.app = express();
46
+ Object.assign(this, this.options);
47
+
48
+ // Middleware to parse request bodies based on the specified encoding
49
+ if (this.encoding === ENCODINGS.json) {
50
+ this.app.use(bodyParser.json());
51
+ } else if (this.encoding === ENCODINGS.urlencoded) {
52
+ this.app.use(bodyParser.urlencoded({ extended: true }));
53
+ }
54
+
55
+ this.services.forEach(service => this.app[service.method](service.serviceName, service.function));
56
+ this.publicPaths.forEach(public_path => this.app.use(express.static(path.join(process.cwd(), public_path))));
57
+ }
58
+
59
+ /**
60
+ * HTTP Server
61
+ * @param {RedWebOptions} options - Configuration options for RedWeb.
62
+ * @return {Object} Express application instance.
63
+ */
64
+ function HttpServer(options = {}) {
65
+ BaseHttpServer.call(this, options);
66
+ this.app.listen(this.port, this.listenCallback ? this.listenCallback : () => console.log(`RedWeb HttpServer listening on port ${this.port}`));
67
+ return this;
68
+ }
69
+
70
+ /**
71
+ * HTTPS Server
72
+ * @param {RedWebOptions} options - Configuration options for RedWeb.
73
+ * @return {Object} Express application instance.
74
+ */
75
+ function HttpsServer(options = {}) {
76
+ BaseHttpServer.call(this, options);
77
+ const sslOptions = loadSslConfig(this.ssl);
78
+ https.createServer(sslOptions, this.app).listen(this.port, this.listenCallback ? this.listenCallback : () => console.log(`RedWeb HttpsServer listening on port ${this.port}`));
79
+ return this;
80
+ }
81
+
82
+ module.exports = {
83
+ HttpServer,
84
+ HttpsServer,
85
+ ENCODINGS,
86
+ METHODS,
87
+ HTTP_OPTIONS
88
+ };
@@ -0,0 +1,98 @@
1
+ const http = require('http');
2
+ const https = require('https');
3
+ const socketIo = require('socket.io');
4
+ const loadSslConfig = require('./sslConfig');
5
+
6
+ /**
7
+ * @typedef {Object} SocketServerOptions
8
+ * @property {number} [port=3000] - The port number to bind the socket server.
9
+ * @property {Function} [connectionOpenCallback] - Callback function to execute once a client connects.
10
+ * @property {Function} [connectionCloseCallback] - Callback function to execute once a client disconnects.
11
+ * @property {Function} [messageCallback] - Callback function to execute for every message received.
12
+ * @property {Object} [messageHandlers] - Object containing message handlers based on message type.
13
+ * @property {Object} [ssl] - SSL configuration for SecureSocketServer.
14
+ * @property {string} [ssl.key] - Path to the SSL key file.
15
+ * @property {string} [ssl.cert] - Path to the SSL certificate file.
16
+ */
17
+
18
+ const SOCKET_OPTIONS = {
19
+ port: 3000,
20
+ connectionOpenCallback: undefined,
21
+ connectionCloseCallback: undefined,
22
+ messageCallback: undefined,
23
+ messageHandlers: {
24
+ 'ping': (socket) => socket.send('pong')
25
+ },
26
+ ssl: null
27
+ };
28
+
29
+ /**
30
+ * Base Socket Server
31
+ * @param {Object} server - The HTTP or HTTPS server instance.
32
+ * @param {SocketServerOptions} options - Configuration options for SocketServer.
33
+ * @return {Object} Socket.IO server instance.
34
+ */
35
+ function BaseSocketServer(server, options = {}) {
36
+ this.io = socketIo(server);
37
+ Object.assign(this, { ...SOCKET_OPTIONS, ...options });
38
+
39
+ this.io.on('connection', socket => {
40
+ console.log('New client connected');
41
+ if (this.connectionOpenCallback) this.connectionOpenCallback(socket);
42
+
43
+ socket.on('message', (message) => {
44
+ try {
45
+ const parsedMessage = JSON.parse(message);
46
+ const { type, data } = parsedMessage;
47
+
48
+ if (this.messageHandlers[type]) {
49
+ this.messageHandlers[type](socket, data);
50
+ }
51
+
52
+ if (this.messageCallback) this.messageCallback(socket, message);
53
+ } catch (error) {
54
+ console.error('Error handling message:', error);
55
+ }
56
+ });
57
+
58
+ socket.on('disconnect', () => {
59
+ console.log('Client disconnected');
60
+ if (this.connectionCloseCallback) this.connectionCloseCallback(socket);
61
+ });
62
+
63
+ socket.on('error', (error) => {
64
+ console.error('Socket error:', error);
65
+ });
66
+ });
67
+ }
68
+
69
+ /**
70
+ * WebSocket Server
71
+ * @param {SocketServerOptions} options - Configuration options for SocketServer.
72
+ * @return {Object} Socket.IO server instance.
73
+ */
74
+ function SocketServer(options = {}) {
75
+ const server = http.createServer();
76
+ BaseSocketServer.call(this, server, options);
77
+ server.listen(this.port, () => console.log(`RedWeb SocketServer listening on port ${this.port}`));
78
+ return this.io;
79
+ }
80
+
81
+ /**
82
+ * Secure WebSocket Server
83
+ * @param {SocketServerOptions} options - Configuration options for SecureSocketServer.
84
+ * @return {Object} Socket.IO server instance.
85
+ */
86
+ function SecureSocketServer(options = {}) {
87
+ const sslOptions = loadSslConfig(options.ssl);
88
+ const server = https.createServer(sslOptions);
89
+ BaseSocketServer.call(this, server, options);
90
+ server.listen(this.port, () => console.log(`RedWeb SecureSocketServer listening on port ${this.port}`));
91
+ return this.io;
92
+ }
93
+
94
+ module.exports = {
95
+ SocketServer,
96
+ SecureSocketServer,
97
+ SOCKET_OPTIONS
98
+ };
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
- const { HttpServer, HttpsServer, ENCODINGS, METHODS, HTTP_OPTIONS } = require('./httpServers');
2
- const { SocketServer, SecureSocketServer, SOCKET_OPTIONS } = require('./socketServers');
1
+ const { HttpServer, HttpsServer, ENCODINGS, METHODS, HTTP_OPTIONS } = require('./HttpServer');
2
+ const { SocketServer, SecureSocketServer, SOCKET_OPTIONS } = require('./SocketServer');
3
3
 
4
4
  module.exports = {
5
5
  HttpServer,
package/index.test.js ADDED
@@ -0,0 +1,15 @@
1
+ // const { RedWeb } = require('.');
2
+ // const path = require('path');
3
+
4
+ // jest.mock('express', () => {
5
+ // const self = () => ({
6
+ // use: jest.fn(),
7
+ // listen: jest.fn()
8
+ // });
9
+ // self.static = jest.fn();
10
+ // return self;
11
+ // })
12
+
13
+ // test('it should create a RedWeb instance', () => {
14
+ // expect(RedWeb()).toBeDefined();
15
+ // });
package/package.json CHANGED
@@ -1,14 +1,11 @@
1
1
  {
2
2
  "name": "redweb",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "A way to quickly set up an express server",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "test": "jest"
8
8
  },
9
- "files": [
10
- "index.js"
11
- ],
12
9
  "keywords": [],
13
10
  "author": "",
14
11
  "license": "ISC",
package/sslConfig.js ADDED
@@ -0,0 +1,20 @@
1
+ const fs = require('fs');
2
+
3
+ /**
4
+ * Load SSL configuration
5
+ * @param {Object} sslOptions - The SSL options object containing the paths to key and cert files.
6
+ * @param {string} sslOptions.key - Path to the SSL key file.
7
+ * @param {string} sslOptions.cert - Path to the SSL certificate file.
8
+ * @return {Object} - The loaded SSL options containing key and cert.
9
+ */
10
+ function loadSslConfig(sslOptions) {
11
+ if (!sslOptions || !sslOptions.key || !sslOptions.cert) {
12
+ throw new Error('SSL key and certificate paths must be provided');
13
+ }
14
+ return {
15
+ key: fs.readFileSync(sslOptions.key),
16
+ cert: fs.readFileSync(sslOptions.cert)
17
+ };
18
+ }
19
+
20
+ module.exports = loadSslConfig;
@@ -0,0 +1,940 @@
1
+ {
2
+ "name": "test",
3
+ "version": "1.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "test",
9
+ "version": "1.0.0",
10
+ "license": "ISC",
11
+ "dependencies": {
12
+ "redweb": "^0.1.2"
13
+ }
14
+ },
15
+ "node_modules/@socket.io/component-emitter": {
16
+ "version": "3.1.2",
17
+ "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz",
18
+ "integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA=="
19
+ },
20
+ "node_modules/@types/cookie": {
21
+ "version": "0.4.1",
22
+ "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz",
23
+ "integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q=="
24
+ },
25
+ "node_modules/@types/cors": {
26
+ "version": "2.8.17",
27
+ "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.17.tgz",
28
+ "integrity": "sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==",
29
+ "dependencies": {
30
+ "@types/node": "*"
31
+ }
32
+ },
33
+ "node_modules/@types/node": {
34
+ "version": "20.12.12",
35
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.12.tgz",
36
+ "integrity": "sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==",
37
+ "dependencies": {
38
+ "undici-types": "~5.26.4"
39
+ }
40
+ },
41
+ "node_modules/accepts": {
42
+ "version": "1.3.8",
43
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
44
+ "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
45
+ "dependencies": {
46
+ "mime-types": "~2.1.34",
47
+ "negotiator": "0.6.3"
48
+ },
49
+ "engines": {
50
+ "node": ">= 0.6"
51
+ }
52
+ },
53
+ "node_modules/array-flatten": {
54
+ "version": "1.1.1",
55
+ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
56
+ "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="
57
+ },
58
+ "node_modules/base64id": {
59
+ "version": "2.0.0",
60
+ "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz",
61
+ "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==",
62
+ "engines": {
63
+ "node": "^4.5.0 || >= 5.9"
64
+ }
65
+ },
66
+ "node_modules/body-parser": {
67
+ "version": "1.20.2",
68
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz",
69
+ "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==",
70
+ "dependencies": {
71
+ "bytes": "3.1.2",
72
+ "content-type": "~1.0.5",
73
+ "debug": "2.6.9",
74
+ "depd": "2.0.0",
75
+ "destroy": "1.2.0",
76
+ "http-errors": "2.0.0",
77
+ "iconv-lite": "0.4.24",
78
+ "on-finished": "2.4.1",
79
+ "qs": "6.11.0",
80
+ "raw-body": "2.5.2",
81
+ "type-is": "~1.6.18",
82
+ "unpipe": "1.0.0"
83
+ },
84
+ "engines": {
85
+ "node": ">= 0.8",
86
+ "npm": "1.2.8000 || >= 1.4.16"
87
+ }
88
+ },
89
+ "node_modules/bytes": {
90
+ "version": "3.1.2",
91
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
92
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
93
+ "engines": {
94
+ "node": ">= 0.8"
95
+ }
96
+ },
97
+ "node_modules/call-bind": {
98
+ "version": "1.0.7",
99
+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz",
100
+ "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==",
101
+ "dependencies": {
102
+ "es-define-property": "^1.0.0",
103
+ "es-errors": "^1.3.0",
104
+ "function-bind": "^1.1.2",
105
+ "get-intrinsic": "^1.2.4",
106
+ "set-function-length": "^1.2.1"
107
+ },
108
+ "engines": {
109
+ "node": ">= 0.4"
110
+ },
111
+ "funding": {
112
+ "url": "https://github.com/sponsors/ljharb"
113
+ }
114
+ },
115
+ "node_modules/content-disposition": {
116
+ "version": "0.5.4",
117
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
118
+ "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
119
+ "dependencies": {
120
+ "safe-buffer": "5.2.1"
121
+ },
122
+ "engines": {
123
+ "node": ">= 0.6"
124
+ }
125
+ },
126
+ "node_modules/content-type": {
127
+ "version": "1.0.5",
128
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
129
+ "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
130
+ "engines": {
131
+ "node": ">= 0.6"
132
+ }
133
+ },
134
+ "node_modules/cookie": {
135
+ "version": "0.6.0",
136
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz",
137
+ "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==",
138
+ "engines": {
139
+ "node": ">= 0.6"
140
+ }
141
+ },
142
+ "node_modules/cookie-signature": {
143
+ "version": "1.0.6",
144
+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
145
+ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
146
+ },
147
+ "node_modules/cors": {
148
+ "version": "2.8.5",
149
+ "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
150
+ "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
151
+ "dependencies": {
152
+ "object-assign": "^4",
153
+ "vary": "^1"
154
+ },
155
+ "engines": {
156
+ "node": ">= 0.10"
157
+ }
158
+ },
159
+ "node_modules/debug": {
160
+ "version": "2.6.9",
161
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
162
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
163
+ "dependencies": {
164
+ "ms": "2.0.0"
165
+ }
166
+ },
167
+ "node_modules/define-data-property": {
168
+ "version": "1.1.4",
169
+ "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
170
+ "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
171
+ "dependencies": {
172
+ "es-define-property": "^1.0.0",
173
+ "es-errors": "^1.3.0",
174
+ "gopd": "^1.0.1"
175
+ },
176
+ "engines": {
177
+ "node": ">= 0.4"
178
+ },
179
+ "funding": {
180
+ "url": "https://github.com/sponsors/ljharb"
181
+ }
182
+ },
183
+ "node_modules/depd": {
184
+ "version": "2.0.0",
185
+ "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
186
+ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
187
+ "engines": {
188
+ "node": ">= 0.8"
189
+ }
190
+ },
191
+ "node_modules/destroy": {
192
+ "version": "1.2.0",
193
+ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
194
+ "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
195
+ "engines": {
196
+ "node": ">= 0.8",
197
+ "npm": "1.2.8000 || >= 1.4.16"
198
+ }
199
+ },
200
+ "node_modules/ee-first": {
201
+ "version": "1.1.1",
202
+ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
203
+ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
204
+ },
205
+ "node_modules/encodeurl": {
206
+ "version": "1.0.2",
207
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
208
+ "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
209
+ "engines": {
210
+ "node": ">= 0.8"
211
+ }
212
+ },
213
+ "node_modules/engine.io": {
214
+ "version": "6.5.4",
215
+ "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.5.4.tgz",
216
+ "integrity": "sha512-KdVSDKhVKyOi+r5uEabrDLZw2qXStVvCsEB/LN3mw4WFi6Gx50jTyuxYVCwAAC0U46FdnzP/ScKRBTXb/NiEOg==",
217
+ "dependencies": {
218
+ "@types/cookie": "^0.4.1",
219
+ "@types/cors": "^2.8.12",
220
+ "@types/node": ">=10.0.0",
221
+ "accepts": "~1.3.4",
222
+ "base64id": "2.0.0",
223
+ "cookie": "~0.4.1",
224
+ "cors": "~2.8.5",
225
+ "debug": "~4.3.1",
226
+ "engine.io-parser": "~5.2.1",
227
+ "ws": "~8.11.0"
228
+ },
229
+ "engines": {
230
+ "node": ">=10.2.0"
231
+ }
232
+ },
233
+ "node_modules/engine.io-parser": {
234
+ "version": "5.2.2",
235
+ "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.2.tgz",
236
+ "integrity": "sha512-RcyUFKA93/CXH20l4SoVvzZfrSDMOTUS3bWVpTt2FuFP+XYrL8i8oonHP7WInRyVHXh0n/ORtoeiE1os+8qkSw==",
237
+ "engines": {
238
+ "node": ">=10.0.0"
239
+ }
240
+ },
241
+ "node_modules/engine.io/node_modules/cookie": {
242
+ "version": "0.4.2",
243
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz",
244
+ "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==",
245
+ "engines": {
246
+ "node": ">= 0.6"
247
+ }
248
+ },
249
+ "node_modules/engine.io/node_modules/debug": {
250
+ "version": "4.3.4",
251
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
252
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
253
+ "dependencies": {
254
+ "ms": "2.1.2"
255
+ },
256
+ "engines": {
257
+ "node": ">=6.0"
258
+ },
259
+ "peerDependenciesMeta": {
260
+ "supports-color": {
261
+ "optional": true
262
+ }
263
+ }
264
+ },
265
+ "node_modules/engine.io/node_modules/ms": {
266
+ "version": "2.1.2",
267
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
268
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
269
+ },
270
+ "node_modules/es-define-property": {
271
+ "version": "1.0.0",
272
+ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz",
273
+ "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==",
274
+ "dependencies": {
275
+ "get-intrinsic": "^1.2.4"
276
+ },
277
+ "engines": {
278
+ "node": ">= 0.4"
279
+ }
280
+ },
281
+ "node_modules/es-errors": {
282
+ "version": "1.3.0",
283
+ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
284
+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
285
+ "engines": {
286
+ "node": ">= 0.4"
287
+ }
288
+ },
289
+ "node_modules/escape-html": {
290
+ "version": "1.0.3",
291
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
292
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
293
+ },
294
+ "node_modules/etag": {
295
+ "version": "1.8.1",
296
+ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
297
+ "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
298
+ "engines": {
299
+ "node": ">= 0.6"
300
+ }
301
+ },
302
+ "node_modules/express": {
303
+ "version": "4.19.2",
304
+ "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz",
305
+ "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==",
306
+ "dependencies": {
307
+ "accepts": "~1.3.8",
308
+ "array-flatten": "1.1.1",
309
+ "body-parser": "1.20.2",
310
+ "content-disposition": "0.5.4",
311
+ "content-type": "~1.0.4",
312
+ "cookie": "0.6.0",
313
+ "cookie-signature": "1.0.6",
314
+ "debug": "2.6.9",
315
+ "depd": "2.0.0",
316
+ "encodeurl": "~1.0.2",
317
+ "escape-html": "~1.0.3",
318
+ "etag": "~1.8.1",
319
+ "finalhandler": "1.2.0",
320
+ "fresh": "0.5.2",
321
+ "http-errors": "2.0.0",
322
+ "merge-descriptors": "1.0.1",
323
+ "methods": "~1.1.2",
324
+ "on-finished": "2.4.1",
325
+ "parseurl": "~1.3.3",
326
+ "path-to-regexp": "0.1.7",
327
+ "proxy-addr": "~2.0.7",
328
+ "qs": "6.11.0",
329
+ "range-parser": "~1.2.1",
330
+ "safe-buffer": "5.2.1",
331
+ "send": "0.18.0",
332
+ "serve-static": "1.15.0",
333
+ "setprototypeof": "1.2.0",
334
+ "statuses": "2.0.1",
335
+ "type-is": "~1.6.18",
336
+ "utils-merge": "1.0.1",
337
+ "vary": "~1.1.2"
338
+ },
339
+ "engines": {
340
+ "node": ">= 0.10.0"
341
+ }
342
+ },
343
+ "node_modules/finalhandler": {
344
+ "version": "1.2.0",
345
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
346
+ "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
347
+ "dependencies": {
348
+ "debug": "2.6.9",
349
+ "encodeurl": "~1.0.2",
350
+ "escape-html": "~1.0.3",
351
+ "on-finished": "2.4.1",
352
+ "parseurl": "~1.3.3",
353
+ "statuses": "2.0.1",
354
+ "unpipe": "~1.0.0"
355
+ },
356
+ "engines": {
357
+ "node": ">= 0.8"
358
+ }
359
+ },
360
+ "node_modules/forwarded": {
361
+ "version": "0.2.0",
362
+ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
363
+ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
364
+ "engines": {
365
+ "node": ">= 0.6"
366
+ }
367
+ },
368
+ "node_modules/fresh": {
369
+ "version": "0.5.2",
370
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
371
+ "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
372
+ "engines": {
373
+ "node": ">= 0.6"
374
+ }
375
+ },
376
+ "node_modules/function-bind": {
377
+ "version": "1.1.2",
378
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
379
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
380
+ "funding": {
381
+ "url": "https://github.com/sponsors/ljharb"
382
+ }
383
+ },
384
+ "node_modules/get-intrinsic": {
385
+ "version": "1.2.4",
386
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz",
387
+ "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==",
388
+ "dependencies": {
389
+ "es-errors": "^1.3.0",
390
+ "function-bind": "^1.1.2",
391
+ "has-proto": "^1.0.1",
392
+ "has-symbols": "^1.0.3",
393
+ "hasown": "^2.0.0"
394
+ },
395
+ "engines": {
396
+ "node": ">= 0.4"
397
+ },
398
+ "funding": {
399
+ "url": "https://github.com/sponsors/ljharb"
400
+ }
401
+ },
402
+ "node_modules/gopd": {
403
+ "version": "1.0.1",
404
+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
405
+ "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
406
+ "dependencies": {
407
+ "get-intrinsic": "^1.1.3"
408
+ },
409
+ "funding": {
410
+ "url": "https://github.com/sponsors/ljharb"
411
+ }
412
+ },
413
+ "node_modules/has-property-descriptors": {
414
+ "version": "1.0.2",
415
+ "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
416
+ "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
417
+ "dependencies": {
418
+ "es-define-property": "^1.0.0"
419
+ },
420
+ "funding": {
421
+ "url": "https://github.com/sponsors/ljharb"
422
+ }
423
+ },
424
+ "node_modules/has-proto": {
425
+ "version": "1.0.3",
426
+ "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz",
427
+ "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==",
428
+ "engines": {
429
+ "node": ">= 0.4"
430
+ },
431
+ "funding": {
432
+ "url": "https://github.com/sponsors/ljharb"
433
+ }
434
+ },
435
+ "node_modules/has-symbols": {
436
+ "version": "1.0.3",
437
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
438
+ "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
439
+ "engines": {
440
+ "node": ">= 0.4"
441
+ },
442
+ "funding": {
443
+ "url": "https://github.com/sponsors/ljharb"
444
+ }
445
+ },
446
+ "node_modules/hasown": {
447
+ "version": "2.0.2",
448
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
449
+ "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
450
+ "dependencies": {
451
+ "function-bind": "^1.1.2"
452
+ },
453
+ "engines": {
454
+ "node": ">= 0.4"
455
+ }
456
+ },
457
+ "node_modules/http-errors": {
458
+ "version": "2.0.0",
459
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
460
+ "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
461
+ "dependencies": {
462
+ "depd": "2.0.0",
463
+ "inherits": "2.0.4",
464
+ "setprototypeof": "1.2.0",
465
+ "statuses": "2.0.1",
466
+ "toidentifier": "1.0.1"
467
+ },
468
+ "engines": {
469
+ "node": ">= 0.8"
470
+ }
471
+ },
472
+ "node_modules/iconv-lite": {
473
+ "version": "0.4.24",
474
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
475
+ "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
476
+ "dependencies": {
477
+ "safer-buffer": ">= 2.1.2 < 3"
478
+ },
479
+ "engines": {
480
+ "node": ">=0.10.0"
481
+ }
482
+ },
483
+ "node_modules/inherits": {
484
+ "version": "2.0.4",
485
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
486
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
487
+ },
488
+ "node_modules/ipaddr.js": {
489
+ "version": "1.9.1",
490
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
491
+ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
492
+ "engines": {
493
+ "node": ">= 0.10"
494
+ }
495
+ },
496
+ "node_modules/media-typer": {
497
+ "version": "0.3.0",
498
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
499
+ "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
500
+ "engines": {
501
+ "node": ">= 0.6"
502
+ }
503
+ },
504
+ "node_modules/merge-descriptors": {
505
+ "version": "1.0.1",
506
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
507
+ "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w=="
508
+ },
509
+ "node_modules/methods": {
510
+ "version": "1.1.2",
511
+ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
512
+ "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
513
+ "engines": {
514
+ "node": ">= 0.6"
515
+ }
516
+ },
517
+ "node_modules/mime": {
518
+ "version": "1.6.0",
519
+ "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
520
+ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
521
+ "bin": {
522
+ "mime": "cli.js"
523
+ },
524
+ "engines": {
525
+ "node": ">=4"
526
+ }
527
+ },
528
+ "node_modules/mime-db": {
529
+ "version": "1.52.0",
530
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
531
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
532
+ "engines": {
533
+ "node": ">= 0.6"
534
+ }
535
+ },
536
+ "node_modules/mime-types": {
537
+ "version": "2.1.35",
538
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
539
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
540
+ "dependencies": {
541
+ "mime-db": "1.52.0"
542
+ },
543
+ "engines": {
544
+ "node": ">= 0.6"
545
+ }
546
+ },
547
+ "node_modules/ms": {
548
+ "version": "2.0.0",
549
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
550
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
551
+ },
552
+ "node_modules/negotiator": {
553
+ "version": "0.6.3",
554
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
555
+ "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
556
+ "engines": {
557
+ "node": ">= 0.6"
558
+ }
559
+ },
560
+ "node_modules/object-assign": {
561
+ "version": "4.1.1",
562
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
563
+ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
564
+ "engines": {
565
+ "node": ">=0.10.0"
566
+ }
567
+ },
568
+ "node_modules/object-inspect": {
569
+ "version": "1.13.1",
570
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz",
571
+ "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==",
572
+ "funding": {
573
+ "url": "https://github.com/sponsors/ljharb"
574
+ }
575
+ },
576
+ "node_modules/on-finished": {
577
+ "version": "2.4.1",
578
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
579
+ "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
580
+ "dependencies": {
581
+ "ee-first": "1.1.1"
582
+ },
583
+ "engines": {
584
+ "node": ">= 0.8"
585
+ }
586
+ },
587
+ "node_modules/parseurl": {
588
+ "version": "1.3.3",
589
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
590
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
591
+ "engines": {
592
+ "node": ">= 0.8"
593
+ }
594
+ },
595
+ "node_modules/path-to-regexp": {
596
+ "version": "0.1.7",
597
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
598
+ "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
599
+ },
600
+ "node_modules/proxy-addr": {
601
+ "version": "2.0.7",
602
+ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
603
+ "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
604
+ "dependencies": {
605
+ "forwarded": "0.2.0",
606
+ "ipaddr.js": "1.9.1"
607
+ },
608
+ "engines": {
609
+ "node": ">= 0.10"
610
+ }
611
+ },
612
+ "node_modules/qs": {
613
+ "version": "6.11.0",
614
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
615
+ "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
616
+ "dependencies": {
617
+ "side-channel": "^1.0.4"
618
+ },
619
+ "engines": {
620
+ "node": ">=0.6"
621
+ },
622
+ "funding": {
623
+ "url": "https://github.com/sponsors/ljharb"
624
+ }
625
+ },
626
+ "node_modules/range-parser": {
627
+ "version": "1.2.1",
628
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
629
+ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
630
+ "engines": {
631
+ "node": ">= 0.6"
632
+ }
633
+ },
634
+ "node_modules/raw-body": {
635
+ "version": "2.5.2",
636
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz",
637
+ "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==",
638
+ "dependencies": {
639
+ "bytes": "3.1.2",
640
+ "http-errors": "2.0.0",
641
+ "iconv-lite": "0.4.24",
642
+ "unpipe": "1.0.0"
643
+ },
644
+ "engines": {
645
+ "node": ">= 0.8"
646
+ }
647
+ },
648
+ "node_modules/redweb": {
649
+ "version": "0.1.2",
650
+ "resolved": "https://registry.npmjs.org/redweb/-/redweb-0.1.2.tgz",
651
+ "integrity": "sha512-QqI62xwchgR3/1h+hq9gLzFO1bpmSaIGe/jxzGXXpo44nhjRDYTTjWawJ9aXwKJHhHfW2zQW/NgIG7dHavMx4w==",
652
+ "dependencies": {
653
+ "express": "^4.19.2",
654
+ "socket.io": "^4.7.5"
655
+ }
656
+ },
657
+ "node_modules/safe-buffer": {
658
+ "version": "5.2.1",
659
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
660
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
661
+ "funding": [
662
+ {
663
+ "type": "github",
664
+ "url": "https://github.com/sponsors/feross"
665
+ },
666
+ {
667
+ "type": "patreon",
668
+ "url": "https://www.patreon.com/feross"
669
+ },
670
+ {
671
+ "type": "consulting",
672
+ "url": "https://feross.org/support"
673
+ }
674
+ ]
675
+ },
676
+ "node_modules/safer-buffer": {
677
+ "version": "2.1.2",
678
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
679
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
680
+ },
681
+ "node_modules/send": {
682
+ "version": "0.18.0",
683
+ "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
684
+ "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
685
+ "dependencies": {
686
+ "debug": "2.6.9",
687
+ "depd": "2.0.0",
688
+ "destroy": "1.2.0",
689
+ "encodeurl": "~1.0.2",
690
+ "escape-html": "~1.0.3",
691
+ "etag": "~1.8.1",
692
+ "fresh": "0.5.2",
693
+ "http-errors": "2.0.0",
694
+ "mime": "1.6.0",
695
+ "ms": "2.1.3",
696
+ "on-finished": "2.4.1",
697
+ "range-parser": "~1.2.1",
698
+ "statuses": "2.0.1"
699
+ },
700
+ "engines": {
701
+ "node": ">= 0.8.0"
702
+ }
703
+ },
704
+ "node_modules/send/node_modules/ms": {
705
+ "version": "2.1.3",
706
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
707
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
708
+ },
709
+ "node_modules/serve-static": {
710
+ "version": "1.15.0",
711
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
712
+ "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
713
+ "dependencies": {
714
+ "encodeurl": "~1.0.2",
715
+ "escape-html": "~1.0.3",
716
+ "parseurl": "~1.3.3",
717
+ "send": "0.18.0"
718
+ },
719
+ "engines": {
720
+ "node": ">= 0.8.0"
721
+ }
722
+ },
723
+ "node_modules/set-function-length": {
724
+ "version": "1.2.2",
725
+ "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
726
+ "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
727
+ "dependencies": {
728
+ "define-data-property": "^1.1.4",
729
+ "es-errors": "^1.3.0",
730
+ "function-bind": "^1.1.2",
731
+ "get-intrinsic": "^1.2.4",
732
+ "gopd": "^1.0.1",
733
+ "has-property-descriptors": "^1.0.2"
734
+ },
735
+ "engines": {
736
+ "node": ">= 0.4"
737
+ }
738
+ },
739
+ "node_modules/setprototypeof": {
740
+ "version": "1.2.0",
741
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
742
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
743
+ },
744
+ "node_modules/side-channel": {
745
+ "version": "1.0.6",
746
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz",
747
+ "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==",
748
+ "dependencies": {
749
+ "call-bind": "^1.0.7",
750
+ "es-errors": "^1.3.0",
751
+ "get-intrinsic": "^1.2.4",
752
+ "object-inspect": "^1.13.1"
753
+ },
754
+ "engines": {
755
+ "node": ">= 0.4"
756
+ },
757
+ "funding": {
758
+ "url": "https://github.com/sponsors/ljharb"
759
+ }
760
+ },
761
+ "node_modules/socket.io": {
762
+ "version": "4.7.5",
763
+ "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.7.5.tgz",
764
+ "integrity": "sha512-DmeAkF6cwM9jSfmp6Dr/5/mfMwb5Z5qRrSXLpo3Fq5SqyU8CMF15jIN4ZhfSwu35ksM1qmHZDQ/DK5XTccSTvA==",
765
+ "dependencies": {
766
+ "accepts": "~1.3.4",
767
+ "base64id": "~2.0.0",
768
+ "cors": "~2.8.5",
769
+ "debug": "~4.3.2",
770
+ "engine.io": "~6.5.2",
771
+ "socket.io-adapter": "~2.5.2",
772
+ "socket.io-parser": "~4.2.4"
773
+ },
774
+ "engines": {
775
+ "node": ">=10.2.0"
776
+ }
777
+ },
778
+ "node_modules/socket.io-adapter": {
779
+ "version": "2.5.4",
780
+ "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.4.tgz",
781
+ "integrity": "sha512-wDNHGXGewWAjQPt3pyeYBtpWSq9cLE5UW1ZUPL/2eGK9jtse/FpXib7epSTsz0Q0m+6sg6Y4KtcFTlah1bdOVg==",
782
+ "dependencies": {
783
+ "debug": "~4.3.4",
784
+ "ws": "~8.11.0"
785
+ }
786
+ },
787
+ "node_modules/socket.io-adapter/node_modules/debug": {
788
+ "version": "4.3.4",
789
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
790
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
791
+ "dependencies": {
792
+ "ms": "2.1.2"
793
+ },
794
+ "engines": {
795
+ "node": ">=6.0"
796
+ },
797
+ "peerDependenciesMeta": {
798
+ "supports-color": {
799
+ "optional": true
800
+ }
801
+ }
802
+ },
803
+ "node_modules/socket.io-adapter/node_modules/ms": {
804
+ "version": "2.1.2",
805
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
806
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
807
+ },
808
+ "node_modules/socket.io-parser": {
809
+ "version": "4.2.4",
810
+ "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz",
811
+ "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==",
812
+ "dependencies": {
813
+ "@socket.io/component-emitter": "~3.1.0",
814
+ "debug": "~4.3.1"
815
+ },
816
+ "engines": {
817
+ "node": ">=10.0.0"
818
+ }
819
+ },
820
+ "node_modules/socket.io-parser/node_modules/debug": {
821
+ "version": "4.3.4",
822
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
823
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
824
+ "dependencies": {
825
+ "ms": "2.1.2"
826
+ },
827
+ "engines": {
828
+ "node": ">=6.0"
829
+ },
830
+ "peerDependenciesMeta": {
831
+ "supports-color": {
832
+ "optional": true
833
+ }
834
+ }
835
+ },
836
+ "node_modules/socket.io-parser/node_modules/ms": {
837
+ "version": "2.1.2",
838
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
839
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
840
+ },
841
+ "node_modules/socket.io/node_modules/debug": {
842
+ "version": "4.3.4",
843
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
844
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
845
+ "dependencies": {
846
+ "ms": "2.1.2"
847
+ },
848
+ "engines": {
849
+ "node": ">=6.0"
850
+ },
851
+ "peerDependenciesMeta": {
852
+ "supports-color": {
853
+ "optional": true
854
+ }
855
+ }
856
+ },
857
+ "node_modules/socket.io/node_modules/ms": {
858
+ "version": "2.1.2",
859
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
860
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
861
+ },
862
+ "node_modules/statuses": {
863
+ "version": "2.0.1",
864
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
865
+ "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
866
+ "engines": {
867
+ "node": ">= 0.8"
868
+ }
869
+ },
870
+ "node_modules/toidentifier": {
871
+ "version": "1.0.1",
872
+ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
873
+ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
874
+ "engines": {
875
+ "node": ">=0.6"
876
+ }
877
+ },
878
+ "node_modules/type-is": {
879
+ "version": "1.6.18",
880
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
881
+ "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
882
+ "dependencies": {
883
+ "media-typer": "0.3.0",
884
+ "mime-types": "~2.1.24"
885
+ },
886
+ "engines": {
887
+ "node": ">= 0.6"
888
+ }
889
+ },
890
+ "node_modules/undici-types": {
891
+ "version": "5.26.5",
892
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
893
+ "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="
894
+ },
895
+ "node_modules/unpipe": {
896
+ "version": "1.0.0",
897
+ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
898
+ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
899
+ "engines": {
900
+ "node": ">= 0.8"
901
+ }
902
+ },
903
+ "node_modules/utils-merge": {
904
+ "version": "1.0.1",
905
+ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
906
+ "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
907
+ "engines": {
908
+ "node": ">= 0.4.0"
909
+ }
910
+ },
911
+ "node_modules/vary": {
912
+ "version": "1.1.2",
913
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
914
+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
915
+ "engines": {
916
+ "node": ">= 0.8"
917
+ }
918
+ },
919
+ "node_modules/ws": {
920
+ "version": "8.11.0",
921
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz",
922
+ "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==",
923
+ "engines": {
924
+ "node": ">=10.0.0"
925
+ },
926
+ "peerDependencies": {
927
+ "bufferutil": "^4.0.1",
928
+ "utf-8-validate": "^5.0.2"
929
+ },
930
+ "peerDependenciesMeta": {
931
+ "bufferutil": {
932
+ "optional": true
933
+ },
934
+ "utf-8-validate": {
935
+ "optional": true
936
+ }
937
+ }
938
+ }
939
+ }
940
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "test",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "test.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "ISC",
12
+ "dependencies": {
13
+ "redweb": "^0.1.2"
14
+ }
15
+ }
@@ -0,0 +1,11 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Hello World</title>
7
+ </head>
8
+ <body>
9
+ <p>Hello world!</p>
10
+ </body>
11
+ </html>
package/test/test.js ADDED
@@ -0,0 +1,4 @@
1
+ const RedWeb = require('redweb');
2
+
3
+ const http = new RedWeb.HttpServer();
4
+ const socket = new RedWeb.SocketServer();