@wzyjs/utils 0.3.36 → 0.3.37
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getLocalIp: () => string | null;
|
package/dist/node.cjs.js
CHANGED
|
@@ -5517,6 +5517,7 @@ __export(exports_node, {
|
|
|
5517
5517
|
nullable: () => nullableType,
|
|
5518
5518
|
null: () => nullType,
|
|
5519
5519
|
never: () => neverType,
|
|
5520
|
+
network: () => exports_network,
|
|
5520
5521
|
nativeEnum: () => nativeEnumType,
|
|
5521
5522
|
nan: () => nanType,
|
|
5522
5523
|
map: () => mapType,
|
|
@@ -10734,7 +10735,7 @@ var Timezone;
|
|
|
10734
10735
|
Timezone2["EuropeBerlin"] = "Europe/Berlin";
|
|
10735
10736
|
})(Timezone ||= {});
|
|
10736
10737
|
var dayjs_default = import_dayjs.default;
|
|
10737
|
-
// src/node/cors.ts
|
|
10738
|
+
// src/node/cors/index.ts
|
|
10738
10739
|
var exports_cors = {};
|
|
10739
10740
|
__export(exports_cors, {
|
|
10740
10741
|
createCorsPreflightResponse: () => createCorsPreflightResponse,
|
|
@@ -12127,5 +12128,23 @@ var getFanqieChapterContents = async (fanqieBookId, chapterIds, sidecarOptions)
|
|
|
12127
12128
|
}
|
|
12128
12129
|
}
|
|
12129
12130
|
};
|
|
12131
|
+
// src/node/network/index.ts
|
|
12132
|
+
var exports_network = {};
|
|
12133
|
+
__export(exports_network, {
|
|
12134
|
+
getLocalIp: () => getLocalIp
|
|
12135
|
+
});
|
|
12136
|
+
var import_os = __toESM(require("os"));
|
|
12137
|
+
var getLocalIp = () => {
|
|
12138
|
+
const interfaces = import_os.default.networkInterfaces();
|
|
12139
|
+
for (const name of Object.keys(interfaces)) {
|
|
12140
|
+
for (const net of interfaces[name] || []) {
|
|
12141
|
+
if (net.family === "IPv4" && !net.internal) {
|
|
12142
|
+
return net.address;
|
|
12143
|
+
}
|
|
12144
|
+
}
|
|
12145
|
+
}
|
|
12146
|
+
return null;
|
|
12147
|
+
};
|
|
12148
|
+
|
|
12130
12149
|
// src/node.ts
|
|
12131
12150
|
var _ = import_lodash.default;
|
package/dist/node.d.ts
CHANGED
package/dist/node.esm.js
CHANGED
|
@@ -10559,7 +10559,7 @@ var Timezone;
|
|
|
10559
10559
|
Timezone2["EuropeBerlin"] = "Europe/Berlin";
|
|
10560
10560
|
})(Timezone ||= {});
|
|
10561
10561
|
var dayjs_default = dayjs;
|
|
10562
|
-
// src/node/cors.ts
|
|
10562
|
+
// src/node/cors/index.ts
|
|
10563
10563
|
var exports_cors = {};
|
|
10564
10564
|
__export(exports_cors, {
|
|
10565
10565
|
createCorsPreflightResponse: () => createCorsPreflightResponse,
|
|
@@ -11952,6 +11952,24 @@ var getFanqieChapterContents = async (fanqieBookId, chapterIds, sidecarOptions)
|
|
|
11952
11952
|
}
|
|
11953
11953
|
}
|
|
11954
11954
|
};
|
|
11955
|
+
// src/node/network/index.ts
|
|
11956
|
+
var exports_network = {};
|
|
11957
|
+
__export(exports_network, {
|
|
11958
|
+
getLocalIp: () => getLocalIp
|
|
11959
|
+
});
|
|
11960
|
+
import os from "os";
|
|
11961
|
+
var getLocalIp = () => {
|
|
11962
|
+
const interfaces = os.networkInterfaces();
|
|
11963
|
+
for (const name of Object.keys(interfaces)) {
|
|
11964
|
+
for (const net of interfaces[name] || []) {
|
|
11965
|
+
if (net.family === "IPv4" && !net.internal) {
|
|
11966
|
+
return net.address;
|
|
11967
|
+
}
|
|
11968
|
+
}
|
|
11969
|
+
}
|
|
11970
|
+
return null;
|
|
11971
|
+
};
|
|
11972
|
+
|
|
11955
11973
|
// src/node.ts
|
|
11956
11974
|
var _ = import_lodash.default;
|
|
11957
11975
|
export {
|
|
@@ -11992,6 +12010,7 @@ export {
|
|
|
11992
12010
|
nullableType as nullable,
|
|
11993
12011
|
nullType as null,
|
|
11994
12012
|
neverType as never,
|
|
12013
|
+
exports_network as network,
|
|
11995
12014
|
nativeEnumType as nativeEnum,
|
|
11996
12015
|
nanType as nan,
|
|
11997
12016
|
mapType as map,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wzyjs/utils",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.37",
|
|
4
4
|
"description": "description",
|
|
5
5
|
"author": "wzy",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@types/nodemailer": "^6.4.7",
|
|
73
73
|
"@types/papaparse": "^5.3.15"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "66fc9b56ff49d9a725189dbd3360d6987cb9d604",
|
|
76
76
|
"publishConfig": {
|
|
77
77
|
"access": "public"
|
|
78
78
|
}
|
|
File without changes
|