abler-api 0.1.18 → 0.1.21
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/pp-util.js +4 -9
- package/package.json +1 -1
package/dist/cjs/pp-util.js
CHANGED
|
@@ -1055,14 +1055,9 @@ class apiUtil$1 {
|
|
|
1055
1055
|
|
|
1056
1056
|
static getEnvHosts(params) {
|
|
1057
1057
|
configNeeded();
|
|
1058
|
-
let envType = ppUtil$2.getEnvType();
|
|
1059
|
-
let x = conf$1.envHosts[envType] || {
|
|
1060
|
-
hosts: ["localhost"]
|
|
1061
|
-
};
|
|
1062
|
-
let port = +params.port || 8443;
|
|
1063
1058
|
return {
|
|
1064
|
-
hosts:
|
|
1065
|
-
port:
|
|
1059
|
+
hosts: appSetting.serverHosts || ["localhost"],
|
|
1060
|
+
port: appSetting.listenPort || +params.port || 8443
|
|
1066
1061
|
};
|
|
1067
1062
|
}
|
|
1068
1063
|
/**
|
|
@@ -1075,7 +1070,7 @@ class apiUtil$1 {
|
|
|
1075
1070
|
|
|
1076
1071
|
static async hostIsMySelf(host, req) {
|
|
1077
1072
|
let clientIp = apiUtil$1.getClientIp(req);
|
|
1078
|
-
return getMyIp({
|
|
1073
|
+
return ppUtil$2.getMyIp({
|
|
1079
1074
|
hosts: [host, clientIp]
|
|
1080
1075
|
});
|
|
1081
1076
|
}
|
|
@@ -1517,7 +1512,7 @@ class preconditions$1 {
|
|
|
1517
1512
|
}
|
|
1518
1513
|
|
|
1519
1514
|
await fs.async_writeFile(`../log/preconditions`, text);
|
|
1520
|
-
return text
|
|
1515
|
+
return !text;
|
|
1521
1516
|
} // 检查器
|
|
1522
1517
|
|
|
1523
1518
|
/**
|