@lsby/net-core 0.0.16 → 0.0.17

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.
File without changes
File without changes
File without changes
@@ -350,10 +350,11 @@ var \u670D\u52A1\u5668 = class {
350
350
  res.send("\u672A\u77E5\u9519\u8BEF");
351
351
  }
352
352
  });
353
- var server = null;
354
- await new Promise((res, _rej) => server = app.listen(this.\u7AEF\u53E3, () => res()));
355
- if (server == null)
356
- throw new Error("\u542F\u52A8\u670D\u52A1\u5668\u5931\u8D25");
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 = null;
175
- await new Promise((res, _rej) => server = app.listen(this.\u7AEF\u53E3, () => res()));
176
- if (server == null)
177
- throw new Error("\u542F\u52A8\u670D\u52A1\u5668\u5931\u8D25");
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 = null;
51
- await new Promise((res, _rej) => server = app.listen(this.\u7AEF\u53E3, () => res()));
52
- if (server == null)
53
- throw new Error("\u542F\u52A8\u670D\u52A1\u5668\u5931\u8D25");
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
@@ -1,9 +1,6 @@
1
1
  import {
2
2
  表单解析插件
3
3
  } from "./chunk-5UUMGDDD.js";
4
- import {
5
- 服务器
6
- } from "./chunk-G4UCZNN6.js";
7
4
  import {
8
5
  正确JSON结果,
9
6
  正确结果,
@@ -15,6 +12,9 @@ import {
15
12
  import {
16
13
  测试
17
14
  } from "./chunk-I4WZG5LK.js";
15
+ import {
16
+ 服务器
17
+ } from "./chunk-OFMQBHC7.js";
18
18
  import {
19
19
  接口类型
20
20
  } from "./chunk-SF5Z34AP.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  服务器
3
- } from "../chunk-G4UCZNN6.js";
3
+ } from "../chunk-OFMQBHC7.js";
4
4
  import "../chunk-ZSY7VBEW.js";
5
5
  import "../chunk-LVYVPQ5V.js";
6
6
  import "../chunk-BZOQHDXK.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lsby/net-core",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "require": "./dist/cjs/index.cjs",
@@ -14,6 +14,19 @@
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
+ "other:clean": "rm -rf dist",
23
+ "other:format": "prettier --write .",
24
+ "other:lint": "eslint . --fix",
25
+ "other:pub": "npm run other:typecheck && npm run other:lint && npm run build:all && bumpp && npm publish --access public",
26
+ "other:typecheck": "tsc --noEmit",
27
+ "other:typecheck:watch": "tsc --noEmit -w",
28
+ "run:start": "tsx src/index.ts"
29
+ },
17
30
  "dependencies": {
18
31
  "commander": "^12.1.0",
19
32
  "debug": "^4.3.5",
@@ -39,18 +52,5 @@
39
52
  },
40
53
  "peerDependencies": {
41
54
  "@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
55
  }
56
- }
56
+ }