@rogatio/cli 6.20.6 → 6.20.7
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/node/index.js +19 -3
- package/package.json +1 -1
package/dist/node/index.js
CHANGED
|
@@ -21148,8 +21148,24 @@ function sleep(ms) {
|
|
|
21148
21148
|
function calculateRetryDelay(attempt) {
|
|
21149
21149
|
return RETRY_DELAY_BASE * 2 ** attempt + Math.random() * 100;
|
|
21150
21150
|
}
|
|
21151
|
-
function
|
|
21152
|
-
|
|
21151
|
+
function publicRequestUrl(url) {
|
|
21152
|
+
let parsed;
|
|
21153
|
+
try {
|
|
21154
|
+
parsed = new URL(url);
|
|
21155
|
+
} catch {
|
|
21156
|
+
return void 0;
|
|
21157
|
+
}
|
|
21158
|
+
parsed.username = "";
|
|
21159
|
+
parsed.password = "";
|
|
21160
|
+
parsed.search = "";
|
|
21161
|
+
parsed.hash = "";
|
|
21162
|
+
return parsed.href;
|
|
21163
|
+
}
|
|
21164
|
+
function providerStatusError(status, url) {
|
|
21165
|
+
const requestUrl = publicRequestUrl(url);
|
|
21166
|
+
return new Error(
|
|
21167
|
+
requestUrl === void 0 ? `HTTP ${status}` : `HTTP ${status} for ${requestUrl}`
|
|
21168
|
+
);
|
|
21153
21169
|
}
|
|
21154
21170
|
async function releaseResponse(response) {
|
|
21155
21171
|
await response.body?.cancel().catch(() => void 0);
|
|
@@ -21204,7 +21220,7 @@ async function fetchProvider(url, init, timeoutMs, signal) {
|
|
|
21204
21220
|
throw e;
|
|
21205
21221
|
}
|
|
21206
21222
|
if (terminalStatus !== void 0) {
|
|
21207
|
-
throw providerStatusError(terminalStatus);
|
|
21223
|
+
throw providerStatusError(terminalStatus, url);
|
|
21208
21224
|
}
|
|
21209
21225
|
}
|
|
21210
21226
|
throw lastError;
|
package/package.json
CHANGED