@lsby/net-core 0.0.17 → 0.0.19
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/dist/cjs/index.cjs
CHANGED
|
@@ -350,11 +350,12 @@ var \u670D\u52A1\u5668 = class {
|
|
|
350
350
|
res.send("\u672A\u77E5\u9519\u8BEF");
|
|
351
351
|
}
|
|
352
352
|
});
|
|
353
|
-
var server;
|
|
353
|
+
var server = null;
|
|
354
354
|
await new Promise((res, _rej) => {
|
|
355
355
|
server = app.listen(this.\u7AEF\u53E3, () => res());
|
|
356
356
|
});
|
|
357
|
-
|
|
357
|
+
if (server == null)
|
|
358
|
+
throw new Error("\u542F\u52A8\u670D\u52A1\u5668\u5931\u8D25");
|
|
358
359
|
return {
|
|
359
360
|
ip: Object.values((0, import_node_os.networkInterfaces)()).flat().flatMap((address) => address !== void 0 ? [address] : []).map((wrappedAddress) => wrappedAddress.address).map((address) => `http://${address}:${this.\u7AEF\u53E3}`),
|
|
360
361
|
server
|
|
@@ -171,11 +171,12 @@ var \u670D\u52A1\u5668 = class {
|
|
|
171
171
|
res.send("\u672A\u77E5\u9519\u8BEF");
|
|
172
172
|
}
|
|
173
173
|
});
|
|
174
|
-
var server;
|
|
174
|
+
var server = null;
|
|
175
175
|
await new Promise((res, _rej) => {
|
|
176
176
|
server = app.listen(this.\u7AEF\u53E3, () => res());
|
|
177
177
|
});
|
|
178
|
-
|
|
178
|
+
if (server == null)
|
|
179
|
+
throw new Error("\u542F\u52A8\u670D\u52A1\u5668\u5931\u8D25");
|
|
179
180
|
return {
|
|
180
181
|
ip: Object.values((0, import_node_os.networkInterfaces)()).flat().flatMap((address) => address !== void 0 ? [address] : []).map((wrappedAddress) => wrappedAddress.address).map((address) => `http://${address}:${this.\u7AEF\u53E3}`),
|
|
181
182
|
server
|
|
@@ -47,11 +47,12 @@ var \u670D\u52A1\u5668 = class {
|
|
|
47
47
|
res.send("\u672A\u77E5\u9519\u8BEF");
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
|
-
var server;
|
|
50
|
+
var server = null;
|
|
51
51
|
await new Promise((res, _rej) => {
|
|
52
52
|
server = app.listen(this.\u7AEF\u53E3, () => res());
|
|
53
53
|
});
|
|
54
|
-
|
|
54
|
+
if (server == null)
|
|
55
|
+
throw new Error("\u542F\u52A8\u670D\u52A1\u5668\u5931\u8D25");
|
|
55
56
|
return {
|
|
56
57
|
ip: Object.values(networkInterfaces()).flat().flatMap((address) => address !== void 0 ? [address] : []).map((wrappedAddress) => wrappedAddress.address).map((address) => `http://${address}:${this.\u7AEF\u53E3}`),
|
|
57
58
|
server
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
表单解析插件
|
|
3
3
|
} from "./chunk-5UUMGDDD.js";
|
|
4
|
+
import {
|
|
5
|
+
服务器
|
|
6
|
+
} from "./chunk-S3ITAYKY.js";
|
|
4
7
|
import {
|
|
5
8
|
正确JSON结果,
|
|
6
9
|
正确结果,
|
|
@@ -12,9 +15,6 @@ import {
|
|
|
12
15
|
import {
|
|
13
16
|
测试
|
|
14
17
|
} from "./chunk-I4WZG5LK.js";
|
|
15
|
-
import {
|
|
16
|
-
服务器
|
|
17
|
-
} from "./chunk-OFMQBHC7.js";
|
|
18
18
|
import {
|
|
19
19
|
接口类型
|
|
20
20
|
} from "./chunk-SF5Z34AP.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lsby/net-core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"require": "./dist/cjs/index.cjs",
|
|
@@ -19,31 +19,29 @@
|
|
|
19
19
|
"build:bin": "tsup src/bin/**/*.ts --external typescript --format cjs --clean --dts -d dist/bin",
|
|
20
20
|
"build:cjs": "tsup src/**/*.ts --external typescript --format cjs --clean --dts -d dist/cjs",
|
|
21
21
|
"build:esm": "tsup src/**/*.ts --external typescript --format esm --clean --dts -d dist/esm",
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
22
|
+
"check:all": "npm run check:format && npm run check:lint && npm run check:type:check",
|
|
23
|
+
"check:format": "prettier --write .",
|
|
24
|
+
"check:lint": "eslint . --fix",
|
|
25
|
+
"check:type:check": "tsc --noEmit",
|
|
26
|
+
"check:type:check:watch": "tsc --noEmit -w",
|
|
27
|
+
"pub:public": "npm run check:all && npm run test:base && npm run build:all && bumpp && npm publish --access public",
|
|
28
|
+
"test:base": "npm run check:all && vitest run",
|
|
29
|
+
"test:coverage": "npm run check:all && vitest run --coverage && open-cli ./coverage/index.html"
|
|
29
30
|
},
|
|
30
31
|
"dependencies": {
|
|
31
32
|
"commander": "^12.1.0",
|
|
32
33
|
"debug": "^4.3.5",
|
|
33
34
|
"express": "^4.19.2",
|
|
35
|
+
"vitest": "^2.0.2",
|
|
34
36
|
"zod": "^3.23.8"
|
|
35
37
|
},
|
|
36
38
|
"devDependencies": {
|
|
37
39
|
"@ianvs/prettier-plugin-sort-imports": "^4.2.1",
|
|
40
|
+
"@lsby/eslint-config": "^0.0.2",
|
|
38
41
|
"@types/debug": "^4.1.12",
|
|
39
42
|
"@types/node": "^20.12.10",
|
|
40
|
-
"@
|
|
41
|
-
"@typescript-eslint/parser": "^7.8.0",
|
|
43
|
+
"@vitest/coverage-v8": "^2.0.2",
|
|
42
44
|
"bumpp": "^9.4.1",
|
|
43
|
-
"eslint": "^8.56.0",
|
|
44
|
-
"eslint-config-prettier": "^9.1.0",
|
|
45
|
-
"eslint-plugin-sort-class-members": "^1.20.0",
|
|
46
|
-
"eslint-plugin-unused-imports": "^3.2.0",
|
|
47
45
|
"prettier": "3.2.5",
|
|
48
46
|
"prettier-plugin-packagejson": "^2.5.0",
|
|
49
47
|
"tsup": "^8.0.2",
|