@pluv/platform-node 0.25.4 → 0.27.0
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 +17 -0
- package/dist/index.js +3 -16
- package/dist/index.mjs +7 -22
- package/package.json +8 -8
- package/src/NodePlatform.ts +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
|
|
2
|
-
> @pluv/platform-node@0.
|
|
2
|
+
> @pluv/platform-node@0.27.0 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 v8.
|
|
7
|
+
[34mCLI[39m tsup v8.3.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[
|
|
12
|
-
[32mESM[39m ⚡️ Build success in
|
|
13
|
-
[32mCJS[39m [1mdist/index.js [22m[32m9.
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in
|
|
11
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m7.42 KB[39m
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 117ms
|
|
13
|
+
[32mCJS[39m [1mdist/index.js [22m[32m9.27 KB[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 125ms
|
|
15
15
|
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 4516ms
|
|
17
17
|
[32mDTS[39m [1mdist/index.d.mts [22m[32m3.60 KB[39m
|
|
18
18
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m3.60 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @pluv/platform-node
|
|
2
2
|
|
|
3
|
+
## 0.27.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [19ed36c]
|
|
8
|
+
- Updated dependencies [e309b0b]
|
|
9
|
+
- @pluv/io@0.27.0
|
|
10
|
+
- @pluv/types@0.27.0
|
|
11
|
+
|
|
12
|
+
## 0.26.0
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- 2a6e078: Updated `@pluv/platform-cloudflare` and `@pluv/platform-node` so that exact properties are used in its initialization.
|
|
17
|
+
- @pluv/io@0.26.0
|
|
18
|
+
- @pluv/types@0.26.0
|
|
19
|
+
|
|
3
20
|
## 0.25.4
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -3,22 +3,8 @@ var __create = Object.create;
|
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
-
var __spreadValues = (a, b) => {
|
|
12
|
-
for (var prop in b || (b = {}))
|
|
13
|
-
if (__hasOwnProp.call(b, prop))
|
|
14
|
-
__defNormalProp(a, prop, b[prop]);
|
|
15
|
-
if (__getOwnPropSymbols)
|
|
16
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
-
if (__propIsEnum.call(b, prop))
|
|
18
|
-
__defNormalProp(a, prop, b[prop]);
|
|
19
|
-
}
|
|
20
|
-
return a;
|
|
21
|
-
};
|
|
22
8
|
var __export = (target, all) => {
|
|
23
9
|
for (var name in all)
|
|
24
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -270,11 +256,12 @@ var NodePlatform = class _NodePlatform extends import_io2.AbstractPlatform {
|
|
|
270
256
|
return [];
|
|
271
257
|
}
|
|
272
258
|
initialize(config) {
|
|
273
|
-
return new _NodePlatform(
|
|
259
|
+
return new _NodePlatform({
|
|
260
|
+
context: config.context,
|
|
274
261
|
mode: this._registrationMode,
|
|
275
262
|
persistence: this.persistence,
|
|
276
263
|
pubSub: this.pubSub
|
|
277
|
-
}
|
|
264
|
+
})._initialize();
|
|
278
265
|
}
|
|
279
266
|
parseData(data) {
|
|
280
267
|
if (typeof data === "string") return JSON.parse(data);
|
package/dist/index.mjs
CHANGED
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
-
var __spreadValues = (a, b) => {
|
|
7
|
-
for (var prop in b || (b = {}))
|
|
8
|
-
if (__hasOwnProp.call(b, prop))
|
|
9
|
-
__defNormalProp(a, prop, b[prop]);
|
|
10
|
-
if (__getOwnPropSymbols)
|
|
11
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
-
if (__propIsEnum.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
}
|
|
15
|
-
return a;
|
|
16
|
-
};
|
|
17
1
|
var __async = (__this, __arguments, generator) => {
|
|
18
2
|
return new Promise((resolve, reject) => {
|
|
19
3
|
var fulfilled = (value) => {
|
|
@@ -36,7 +20,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
36
20
|
};
|
|
37
21
|
|
|
38
22
|
// src/createPluvHandler.ts
|
|
39
|
-
import Url from "url";
|
|
23
|
+
import Url from "node:url";
|
|
40
24
|
import { match } from "path-to-regexp";
|
|
41
25
|
import { Server as WsServer } from "ws";
|
|
42
26
|
var handle = (ws) => ({
|
|
@@ -138,12 +122,12 @@ var createPluvHandler = (config) => {
|
|
|
138
122
|
|
|
139
123
|
// src/NodePlatform.ts
|
|
140
124
|
import { AbstractPlatform } from "@pluv/io";
|
|
141
|
-
import crypto2 from "crypto";
|
|
142
|
-
import { TextDecoder } from "util";
|
|
125
|
+
import crypto2 from "node:crypto";
|
|
126
|
+
import { TextDecoder } from "node:util";
|
|
143
127
|
|
|
144
128
|
// src/NodeWebSocket.ts
|
|
145
129
|
import { AbstractWebSocket } from "@pluv/io";
|
|
146
|
-
import crypto from "crypto";
|
|
130
|
+
import crypto from "node:crypto";
|
|
147
131
|
var NodeWebSocket = class extends AbstractWebSocket {
|
|
148
132
|
set presence(presence) {
|
|
149
133
|
this._state.presence = presence;
|
|
@@ -236,11 +220,12 @@ var NodePlatform = class _NodePlatform extends AbstractPlatform {
|
|
|
236
220
|
return [];
|
|
237
221
|
}
|
|
238
222
|
initialize(config) {
|
|
239
|
-
return new _NodePlatform(
|
|
223
|
+
return new _NodePlatform({
|
|
224
|
+
context: config.context,
|
|
240
225
|
mode: this._registrationMode,
|
|
241
226
|
persistence: this.persistence,
|
|
242
227
|
pubSub: this.pubSub
|
|
243
|
-
}
|
|
228
|
+
})._initialize();
|
|
244
229
|
}
|
|
245
230
|
parseData(data) {
|
|
246
231
|
if (typeof data === "string") return JSON.parse(data);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pluv/platform-node",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
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.5.
|
|
20
|
+
"@types/node": "^22.5.5",
|
|
21
21
|
"@types/ws": "^8.5.12",
|
|
22
22
|
"path-to-regexp": "^7.1.0",
|
|
23
|
-
"@pluv/io": "^0.
|
|
24
|
-
"@pluv/types": "^0.
|
|
23
|
+
"@pluv/io": "^0.27.0",
|
|
24
|
+
"@pluv/types": "^0.27.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"eslint": "^8.57.0",
|
|
28
|
-
"tsup": "^8.
|
|
29
|
-
"typescript": "^5.
|
|
28
|
+
"tsup": "^8.3.0",
|
|
29
|
+
"typescript": "^5.6.2",
|
|
30
30
|
"ws": "^8.18.0",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
31
|
+
"eslint-config-pluv": "^0.27.0",
|
|
32
|
+
"@pluv/tsconfig": "^0.27.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"ws": "^8.0.0"
|
package/src/NodePlatform.ts
CHANGED
|
@@ -56,10 +56,10 @@ export class NodePlatform extends AbstractPlatform<NodeWebSocket> {
|
|
|
56
56
|
|
|
57
57
|
public initialize(config: AbstractPlatformConfig<{}, {}>): this {
|
|
58
58
|
return new NodePlatform({
|
|
59
|
+
context: config.context,
|
|
59
60
|
mode: this._registrationMode,
|
|
60
61
|
persistence: this.persistence,
|
|
61
62
|
pubSub: this.pubSub,
|
|
62
|
-
...config,
|
|
63
63
|
} as NodePlatformConfig)._initialize() as this;
|
|
64
64
|
}
|
|
65
65
|
|