@nsshunt/stsconfig 1.25.152 → 1.25.154
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/stsconfig.mjs +29 -5
- package/dist/stsconfig.mjs.map +1 -1
- package/dist/stsconfig.umd.js +30 -8
- package/dist/stsconfig.umd.js.map +1 -1
- package/package.json +1 -1
- package/types/stsconfig.d.ts +3 -0
- package/types/stsconfig.d.ts.map +1 -1
package/dist/stsconfig.mjs
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
+
import * as fs from "node:fs";
|
|
1
2
|
import * as dotenv from "dotenv";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
__proto__: null,
|
|
5
|
-
default: __viteBrowserExternal
|
|
6
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
3
|
+
import http from "node:http";
|
|
4
|
+
import https from "node:https";
|
|
7
5
|
function getDefaultExportFromCjs(x) {
|
|
8
6
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
9
7
|
}
|
|
@@ -1652,9 +1650,35 @@ const envOptionsHandler = {
|
|
|
1652
1650
|
}
|
|
1653
1651
|
};
|
|
1654
1652
|
const goptions = new Proxy(envOptions, envOptionsHandler);
|
|
1653
|
+
function GetAgent(protocol) {
|
|
1654
|
+
if (protocol.toLowerCase().startsWith("https:")) {
|
|
1655
|
+
return new https.Agent({
|
|
1656
|
+
keepAlive: process.env.NODE_ENV === "test" ? false : goptions.keepAlive,
|
|
1657
|
+
maxSockets: goptions.maxSockets,
|
|
1658
|
+
maxTotalSockets: goptions.maxTotalSockets,
|
|
1659
|
+
maxFreeSockets: goptions.maxFreeSockets,
|
|
1660
|
+
timeout: 3e4,
|
|
1661
|
+
//@@ config
|
|
1662
|
+
rejectUnauthorized: goptions.isProduction
|
|
1663
|
+
// Allows self signed certs in non production mode(s)
|
|
1664
|
+
});
|
|
1665
|
+
} else if (protocol.toLowerCase().startsWith("http:")) {
|
|
1666
|
+
return new http.Agent({
|
|
1667
|
+
keepAlive: process.env.NODE_ENV === "test" ? false : goptions.keepAlive,
|
|
1668
|
+
maxSockets: goptions.maxSockets,
|
|
1669
|
+
maxTotalSockets: goptions.maxTotalSockets,
|
|
1670
|
+
maxFreeSockets: goptions.maxFreeSockets,
|
|
1671
|
+
timeout: 3e4
|
|
1672
|
+
//@@ config
|
|
1673
|
+
});
|
|
1674
|
+
} else {
|
|
1675
|
+
return null;
|
|
1676
|
+
}
|
|
1677
|
+
}
|
|
1655
1678
|
export {
|
|
1656
1679
|
$ResetOptions,
|
|
1657
1680
|
$ResetOptionsEx,
|
|
1681
|
+
GetAgent,
|
|
1658
1682
|
goptions
|
|
1659
1683
|
};
|
|
1660
1684
|
//# sourceMappingURL=stsconfig.mjs.map
|