@wix/evalforge-evaluator 0.224.0 → 0.226.0
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/build/index.js +51 -8
- package/build/index.js.map +1 -1
- package/build/index.mjs +51 -8
- package/build/index.mjs.map +1 -1
- package/package.json +13 -13
package/build/index.js
CHANGED
|
@@ -5130,7 +5130,7 @@ var require_http_client_node = __commonJS({
|
|
|
5130
5130
|
* will retry in 1 second.
|
|
5131
5131
|
*/
|
|
5132
5132
|
reportProxyMetric(injectedMeasured, proxyOptions, triesCount = 1) {
|
|
5133
|
-
const gaugeName = !(proxyOptions === null || proxyOptions === void 0 ? void 0 : proxyOptions.httpsAgent) ? "NoProxy" : "Proxy";
|
|
5133
|
+
const gaugeName = !(proxyOptions === null || proxyOptions === void 0 ? void 0 : proxyOptions.httpsAgent) && !(proxyOptions === null || proxyOptions === void 0 ? void 0 : proxyOptions.httpAgent) ? "NoProxy" : "Proxy";
|
|
5134
5134
|
const gauge = initHttpClientInfoGauge(gaugeName, injectedMeasured);
|
|
5135
5135
|
if (gauge) {
|
|
5136
5136
|
gauge(1);
|
|
@@ -5147,16 +5147,35 @@ var require_http_client_node = __commonJS({
|
|
|
5147
5147
|
}
|
|
5148
5148
|
exports2.createHttpClient = createHttpClientNode;
|
|
5149
5149
|
function resolveProxyOptions(disableSquidProxy) {
|
|
5150
|
+
if (disableSquidProxy) {
|
|
5151
|
+
return {};
|
|
5152
|
+
}
|
|
5150
5153
|
const proxyUrlAsString = process.env.WIX_HTTP_CLIENT_PROXY_URL;
|
|
5151
|
-
if (
|
|
5154
|
+
if (proxyUrlAsString === null || proxyUrlAsString === void 0 ? void 0 : proxyUrlAsString.length) {
|
|
5155
|
+
const fullProxyUrl = resolveProxyUrl(proxyUrlAsString);
|
|
5156
|
+
return {
|
|
5157
|
+
// please see axios issue - https://github.com/axios/axios/issues/925#issuecomment-359982190
|
|
5158
|
+
httpsAgent: new https_proxy_agent_1.HttpsProxyAgent(fullProxyUrl),
|
|
5159
|
+
httpAgent: new http_proxy_agent_1.HttpProxyAgent(fullProxyUrl)
|
|
5160
|
+
};
|
|
5161
|
+
}
|
|
5162
|
+
return resolveStandardProxyOptions();
|
|
5163
|
+
}
|
|
5164
|
+
function resolveStandardProxyOptions() {
|
|
5165
|
+
var _a, _b, _c;
|
|
5166
|
+
const httpProxy = (_a = process.env.HTTP_PROXY) !== null && _a !== void 0 ? _a : process.env.http_proxy;
|
|
5167
|
+
const httpsProxy = (_c = (_b = process.env.HTTPS_PROXY) !== null && _b !== void 0 ? _b : process.env.https_proxy) !== null && _c !== void 0 ? _c : httpProxy;
|
|
5168
|
+
if (!httpsProxy && !httpProxy) {
|
|
5152
5169
|
return {};
|
|
5153
5170
|
}
|
|
5154
|
-
const
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5171
|
+
const options = { proxy: false };
|
|
5172
|
+
if (httpsProxy) {
|
|
5173
|
+
options.httpsAgent = new https_proxy_agent_1.HttpsProxyAgent(httpsProxy);
|
|
5174
|
+
}
|
|
5175
|
+
if (httpProxy) {
|
|
5176
|
+
options.httpAgent = new http_proxy_agent_1.HttpProxyAgent(httpProxy);
|
|
5177
|
+
}
|
|
5178
|
+
return options;
|
|
5160
5179
|
}
|
|
5161
5180
|
function resolveProxyUrl(proxyUrl) {
|
|
5162
5181
|
if (proxyUrl.startsWith("http")) {
|
|
@@ -6055,6 +6074,12 @@ function resolveWixEvalforgeV1AgentServiceUrl(opts) {
|
|
|
6055
6074
|
srcPath: "/_api/evalforge-backend",
|
|
6056
6075
|
destPath: ""
|
|
6057
6076
|
}
|
|
6077
|
+
],
|
|
6078
|
+
"www.wixapis.com": [
|
|
6079
|
+
{
|
|
6080
|
+
srcPath: "/_api/evalforge-backend",
|
|
6081
|
+
destPath: ""
|
|
6082
|
+
}
|
|
6058
6083
|
]
|
|
6059
6084
|
};
|
|
6060
6085
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
@@ -6131,6 +6156,12 @@ function resolveWixEvalforgeV1ProjectServiceUrl(opts) {
|
|
|
6131
6156
|
srcPath: "/_api/evalforge-backend",
|
|
6132
6157
|
destPath: ""
|
|
6133
6158
|
}
|
|
6159
|
+
],
|
|
6160
|
+
"www.wixapis.com": [
|
|
6161
|
+
{
|
|
6162
|
+
srcPath: "/_api/evalforge-backend",
|
|
6163
|
+
destPath: ""
|
|
6164
|
+
}
|
|
6134
6165
|
]
|
|
6135
6166
|
};
|
|
6136
6167
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
@@ -6207,6 +6238,12 @@ function resolveWixEvalforgeV1PresetServiceUrl(opts) {
|
|
|
6207
6238
|
srcPath: "/_api/evalforge-backend",
|
|
6208
6239
|
destPath: ""
|
|
6209
6240
|
}
|
|
6241
|
+
],
|
|
6242
|
+
"www.wixapis.com": [
|
|
6243
|
+
{
|
|
6244
|
+
srcPath: "/_api/evalforge-backend",
|
|
6245
|
+
destPath: ""
|
|
6246
|
+
}
|
|
6210
6247
|
]
|
|
6211
6248
|
};
|
|
6212
6249
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
@@ -6430,6 +6467,12 @@ function resolveWixEvalforgeV1SiteProvisioningServiceUrl(opts) {
|
|
|
6430
6467
|
srcPath: "/_api/evalforge-backend",
|
|
6431
6468
|
destPath: ""
|
|
6432
6469
|
}
|
|
6470
|
+
],
|
|
6471
|
+
"www.wixapis.com": [
|
|
6472
|
+
{
|
|
6473
|
+
srcPath: "/_api/evalforge-backend",
|
|
6474
|
+
destPath: ""
|
|
6475
|
+
}
|
|
6433
6476
|
]
|
|
6434
6477
|
};
|
|
6435
6478
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|