@lsby/net-core 0.0.16 → 0.0.18
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/bin/gen-list/bin.cjs +0 -0
- package/dist/bin/gen-test/bin.cjs +0 -0
- package/dist/bin/gen-type/bin.cjs +0 -0
- package/dist/cjs/index.cjs +5 -4
- package/dist/cjs/server/server.cjs +5 -4
- package/dist/esm/{chunk-G4UCZNN6.js → chunk-OFMQBHC7.js} +5 -4
- package/dist/esm/index.js +1 -1
- package/dist/esm/server/server.js +1 -1
- package/package.json +18 -15
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -350,10 +350,11 @@ var \u670D\u52A1\u5668 = class {
|
|
|
350
350
|
res.send("\u672A\u77E5\u9519\u8BEF");
|
|
351
351
|
}
|
|
352
352
|
});
|
|
353
|
-
var server
|
|
354
|
-
await new Promise((res, _rej) =>
|
|
355
|
-
|
|
356
|
-
|
|
353
|
+
var server;
|
|
354
|
+
await new Promise((res, _rej) => {
|
|
355
|
+
server = app.listen(this.\u7AEF\u53E3, () => res());
|
|
356
|
+
});
|
|
357
|
+
throw new Error("\u542F\u52A8\u670D\u52A1\u5668\u5931\u8D25");
|
|
357
358
|
return {
|
|
358
359
|
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}`),
|
|
359
360
|
server
|
|
@@ -171,10 +171,11 @@ var \u670D\u52A1\u5668 = class {
|
|
|
171
171
|
res.send("\u672A\u77E5\u9519\u8BEF");
|
|
172
172
|
}
|
|
173
173
|
});
|
|
174
|
-
var server
|
|
175
|
-
await new Promise((res, _rej) =>
|
|
176
|
-
|
|
177
|
-
|
|
174
|
+
var server;
|
|
175
|
+
await new Promise((res, _rej) => {
|
|
176
|
+
server = app.listen(this.\u7AEF\u53E3, () => res());
|
|
177
|
+
});
|
|
178
|
+
throw new Error("\u542F\u52A8\u670D\u52A1\u5668\u5931\u8D25");
|
|
178
179
|
return {
|
|
179
180
|
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}`),
|
|
180
181
|
server
|
|
@@ -47,10 +47,11 @@ var \u670D\u52A1\u5668 = class {
|
|
|
47
47
|
res.send("\u672A\u77E5\u9519\u8BEF");
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
|
-
var server
|
|
51
|
-
await new Promise((res, _rej) =>
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
var server;
|
|
51
|
+
await new Promise((res, _rej) => {
|
|
52
|
+
server = app.listen(this.\u7AEF\u53E3, () => res());
|
|
53
|
+
});
|
|
54
|
+
throw new Error("\u542F\u52A8\u670D\u52A1\u5668\u5931\u8D25");
|
|
54
55
|
return {
|
|
55
56
|
ip: Object.values(networkInterfaces()).flat().flatMap((address) => address !== void 0 ? [address] : []).map((wrappedAddress) => wrappedAddress.address).map((address) => `http://${address}:${this.\u7AEF\u53E3}`),
|
|
56
57
|
server
|
package/dist/esm/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lsby/net-core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"require": "./dist/cjs/index.cjs",
|
|
@@ -14,10 +14,25 @@
|
|
|
14
14
|
"files": [
|
|
15
15
|
"dist"
|
|
16
16
|
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build:all": "npm run build:cjs && npm run build:esm && npm run build:bin",
|
|
19
|
+
"build:bin": "tsup src/bin/**/*.ts --external typescript --format cjs --clean --dts -d dist/bin",
|
|
20
|
+
"build:cjs": "tsup src/**/*.ts --external typescript --format cjs --clean --dts -d dist/cjs",
|
|
21
|
+
"build:esm": "tsup src/**/*.ts --external typescript --format esm --clean --dts -d dist/esm",
|
|
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"
|
|
30
|
+
},
|
|
17
31
|
"dependencies": {
|
|
18
32
|
"commander": "^12.1.0",
|
|
19
33
|
"debug": "^4.3.5",
|
|
20
34
|
"express": "^4.19.2",
|
|
35
|
+
"vitest": "^2.0.2",
|
|
21
36
|
"zod": "^3.23.8"
|
|
22
37
|
},
|
|
23
38
|
"devDependencies": {
|
|
@@ -26,6 +41,7 @@
|
|
|
26
41
|
"@types/node": "^20.12.10",
|
|
27
42
|
"@typescript-eslint/eslint-plugin": "^7.8.0",
|
|
28
43
|
"@typescript-eslint/parser": "^7.8.0",
|
|
44
|
+
"@vitest/coverage-v8": "^2.0.2",
|
|
29
45
|
"bumpp": "^9.4.1",
|
|
30
46
|
"eslint": "^8.56.0",
|
|
31
47
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -39,18 +55,5 @@
|
|
|
39
55
|
},
|
|
40
56
|
"peerDependencies": {
|
|
41
57
|
"@types/express": "^4.17.21"
|
|
42
|
-
},
|
|
43
|
-
"scripts": {
|
|
44
|
-
"build:all": "npm run build:cjs && npm run build:esm && npm run build:bin",
|
|
45
|
-
"build:bin": "tsup src/bin/**/*.ts --external typescript --format cjs --clean --dts -d dist/bin",
|
|
46
|
-
"build:cjs": "tsup src/**/*.ts --external typescript --format cjs --clean --dts -d dist/cjs",
|
|
47
|
-
"build:esm": "tsup src/**/*.ts --external typescript --format esm --clean --dts -d dist/esm",
|
|
48
|
-
"other:clean": "rm -rf dist",
|
|
49
|
-
"other:format": "prettier --write .",
|
|
50
|
-
"other:lint": "eslint . --fix",
|
|
51
|
-
"other:pub": "npm run other:typecheck && npm run build:all && bumpp && pnpm -r publish --access public",
|
|
52
|
-
"other:typecheck": "tsc --noEmit",
|
|
53
|
-
"other:typecheck:watch": "tsc --noEmit -w",
|
|
54
|
-
"run:start": "tsx src/index.ts"
|
|
55
58
|
}
|
|
56
|
-
}
|
|
59
|
+
}
|