@lsby/net-core 0.0.3 → 0.0.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.
@@ -367,14 +367,14 @@ var \u670D\u52A1\u5668 = class {
367
367
  });
368
368
  });
369
369
  let server = null;
370
- if (server === null) {
371
- throw new Error("\u542F\u52A8\u670D\u52A1\u5668\u5931\u8D25");
372
- }
373
370
  await new Promise((res, _rej) => {
374
371
  server = app.listen(this.\u7AEF\u53E3, () => {
375
372
  res();
376
373
  });
377
374
  });
375
+ if (server === null) {
376
+ throw new Error("\u542F\u52A8\u670D\u52A1\u5668\u5931\u8D25");
377
+ }
378
378
  return {
379
379
  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}`),
380
380
  server
@@ -171,14 +171,14 @@ var \u670D\u52A1\u5668 = class {
171
171
  });
172
172
  });
173
173
  let server = null;
174
- if (server === null) {
175
- throw new Error("\u542F\u52A8\u670D\u52A1\u5668\u5931\u8D25");
176
- }
177
174
  await new Promise((res, _rej) => {
178
175
  server = app.listen(this.\u7AEF\u53E3, () => {
179
176
  res();
180
177
  });
181
178
  });
179
+ if (server === null) {
180
+ throw new Error("\u542F\u52A8\u670D\u52A1\u5668\u5931\u8D25");
181
+ }
182
182
  return {
183
183
  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}`),
184
184
  server
package/dist/esm/index.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-FBQ7H3IE.js";
7
7
  import {
8
8
  服务器
9
- } from "./chunk-4KNOE46Z.js";
9
+ } from "./chunk-VIPMPMTG.js";
10
10
  import {
11
11
  接口类型
12
12
  } from "./chunk-SF5Z34AP.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  服务器
3
- } from "../chunk-4KNOE46Z.js";
3
+ } from "../chunk-VIPMPMTG.js";
4
4
  import "../chunk-UX3PS2US.js";
5
5
  import "../chunk-7FRLG3EW.js";
6
6
  import "../chunk-PLYBVQKK.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lsby/net-core",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "require": "./dist/cjs/index.cjs",
@@ -57,14 +57,14 @@ var \u670D\u52A1\u5668 = class {
57
57
  });
58
58
  });
59
59
  let server = null;
60
- if (server === null) {
61
- throw new Error("\u542F\u52A8\u670D\u52A1\u5668\u5931\u8D25");
62
- }
63
60
  await new Promise((res, _rej) => {
64
61
  server = app.listen(this.\u7AEF\u53E3, () => {
65
62
  res();
66
63
  });
67
64
  });
65
+ if (server === null) {
66
+ throw new Error("\u542F\u52A8\u670D\u52A1\u5668\u5931\u8D25");
67
+ }
68
68
  return {
69
69
  ip: Object.values(networkInterfaces()).flat().flatMap((address) => address !== void 0 ? [address] : []).map((wrappedAddress) => wrappedAddress.address).map((address) => `http://${address}:${this.\u7AEF\u53E3}`),
70
70
  server