@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.
package/dist/cjs/index.cjs
CHANGED
|
@@ -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
package/package.json
CHANGED
|
@@ -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
|