From 943116bc89e6ca41d83a0bd71d59f764de3b0fec Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Fri, 29 Aug 2025 19:17:34 +0100 Subject: [PATCH] Use `url.pathToFileURL` instead of `file-url` --- lib/analyze-action-post.js | 1 - lib/analyze-action.js | 765 ++++++++++++------------ lib/autobuild-action.js | 1 - lib/init-action-post.js | 959 +++++++++++++++--------------- lib/init-action.js | 1 - lib/resolve-environment-action.js | 1 - lib/start-proxy-action-post.js | 1 - lib/start-proxy-action.js | 1 - lib/upload-lib.js | 765 ++++++++++++------------ lib/upload-sarif-action-post.js | 1 - lib/upload-sarif-action.js | 765 ++++++++++++------------ package-lock.json | 8 - package.json | 1 - src/upload-lib.ts | 4 +- 14 files changed, 1575 insertions(+), 1699 deletions(-) diff --git a/lib/analyze-action-post.js b/lib/analyze-action-post.js index 34bb97bb1..a1b0f6ac2 100644 --- a/lib/analyze-action-post.js +++ b/lib/analyze-action-post.js @@ -36289,7 +36289,6 @@ var require_package = __commonJS({ "console-log-level": "^1.4.1", del: "^6.1.1", "fast-deep-equal": "^3.1.3", - "file-url": "^3.0.0", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", diff --git a/lib/analyze-action.js b/lib/analyze-action.js index 20f118bbc..936357be7 100644 --- a/lib/analyze-action.js +++ b/lib/analyze-action.js @@ -283,8 +283,8 @@ var require_proxy = __commonJS({ return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); } var DecodedURL = class extends URL { - constructor(url, base) { - super(url, base); + constructor(url2, base) { + super(url2, base); this._decodedUsername = decodeURIComponent(super.username); this._decodedPassword = decodeURIComponent(super.password); } @@ -957,65 +957,65 @@ var require_util = __commonJS({ function isBlobLike(object) { return Blob2 && object instanceof Blob2 || object && typeof object === "object" && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && /^(Blob|File)$/.test(object[Symbol.toStringTag]); } - function buildURL(url, queryParams) { - if (url.includes("?") || url.includes("#")) { + function buildURL(url2, queryParams) { + if (url2.includes("?") || url2.includes("#")) { throw new Error('Query params cannot be passed when url already contains "?" or "#".'); } const stringified = stringify(queryParams); if (stringified) { - url += "?" + stringified; + url2 += "?" + stringified; } - return url; + return url2; } - function parseURL(url) { - if (typeof url === "string") { - url = new URL(url); - if (!/^https?:/.test(url.origin || url.protocol)) { + function parseURL(url2) { + if (typeof url2 === "string") { + url2 = new URL(url2); + if (!/^https?:/.test(url2.origin || url2.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - return url; + return url2; } - if (!url || typeof url !== "object") { + if (!url2 || typeof url2 !== "object") { throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); } - if (!/^https?:/.test(url.origin || url.protocol)) { + if (!/^https?:/.test(url2.origin || url2.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - if (!(url instanceof URL)) { - if (url.port != null && url.port !== "" && !Number.isFinite(parseInt(url.port))) { + if (!(url2 instanceof URL)) { + if (url2.port != null && url2.port !== "" && !Number.isFinite(parseInt(url2.port))) { throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); } - if (url.path != null && typeof url.path !== "string") { + if (url2.path != null && typeof url2.path !== "string") { throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); } - if (url.pathname != null && typeof url.pathname !== "string") { + if (url2.pathname != null && typeof url2.pathname !== "string") { throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); } - if (url.hostname != null && typeof url.hostname !== "string") { + if (url2.hostname != null && typeof url2.hostname !== "string") { throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); } - if (url.origin != null && typeof url.origin !== "string") { + if (url2.origin != null && typeof url2.origin !== "string") { throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); } - const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; - let origin = url.origin != null ? url.origin : `${url.protocol}//${url.hostname}:${port}`; - let path16 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + const port = url2.port != null ? url2.port : url2.protocol === "https:" ? 443 : 80; + let origin = url2.origin != null ? url2.origin : `${url2.protocol}//${url2.hostname}:${port}`; + let path16 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; if (origin.endsWith("/")) { origin = origin.substring(0, origin.length - 1); } if (path16 && !path16.startsWith("/")) { path16 = `/${path16}`; } - url = new URL(origin + path16); + url2 = new URL(origin + path16); } - return url; + return url2; } - function parseOrigin(url) { - url = parseURL(url); - if (url.pathname !== "/" || url.search || url.hash) { + function parseOrigin(url2) { + url2 = parseURL(url2); + if (url2.pathname !== "/" || url2.search || url2.hash) { throw new InvalidArgumentError("invalid url"); } - return url; + return url2; } function getHostname(host) { if (host[0] === "[") { @@ -3666,8 +3666,8 @@ var require_util2 = __commonJS({ return request.urlList[request.urlList.length - 1]; } function requestBadPort(request) { - const url = requestCurrentURL(request); - if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { + const url2 = requestCurrentURL(request); + if (urlIsHttpHttpsScheme(url2) && badPortsSet.has(url2.port)) { return "blocked"; } return "allowed"; @@ -3881,30 +3881,30 @@ var require_util2 = __commonJS({ return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; } } - function stripURLForReferrer(url, originOnly) { - assert(url instanceof URL); - if (url.protocol === "file:" || url.protocol === "about:" || url.protocol === "blank:") { + function stripURLForReferrer(url2, originOnly) { + assert(url2 instanceof URL); + if (url2.protocol === "file:" || url2.protocol === "about:" || url2.protocol === "blank:") { return "no-referrer"; } - url.username = ""; - url.password = ""; - url.hash = ""; + url2.username = ""; + url2.password = ""; + url2.hash = ""; if (originOnly) { - url.pathname = ""; - url.search = ""; + url2.pathname = ""; + url2.search = ""; } - return url; + return url2; } - function isURLPotentiallyTrustworthy(url) { - if (!(url instanceof URL)) { + function isURLPotentiallyTrustworthy(url2) { + if (!(url2 instanceof URL)) { return false; } - if (url.href === "about:blank" || url.href === "about:srcdoc") { + if (url2.href === "about:blank" || url2.href === "about:srcdoc") { return true; } - if (url.protocol === "data:") return true; - if (url.protocol === "file:") return true; - return isOriginPotentiallyTrustworthy(url.origin); + if (url2.protocol === "data:") return true; + if (url2.protocol === "file:") return true; + return isOriginPotentiallyTrustworthy(url2.origin); function isOriginPotentiallyTrustworthy(origin) { if (origin == null || origin === "null") return false; const originAsURL = new URL(origin); @@ -4174,20 +4174,20 @@ var require_util2 = __commonJS({ byteLength += chunk.length; } } - function urlIsLocal(url) { - assert("protocol" in url); - const protocol = url.protocol; + function urlIsLocal(url2) { + assert("protocol" in url2); + const protocol = url2.protocol; return protocol === "about:" || protocol === "blob:" || protocol === "data:"; } - function urlHasHttpsScheme(url) { - if (typeof url === "string") { - return url.startsWith("https:"); + function urlHasHttpsScheme(url2) { + if (typeof url2 === "string") { + return url2.startsWith("https:"); } - return url.protocol === "https:"; + return url2.protocol === "https:"; } - function urlIsHttpHttpsScheme(url) { - assert("protocol" in url); - const protocol = url.protocol; + function urlIsHttpHttpsScheme(url2) { + assert("protocol" in url2); + const protocol = url2.protocol; return protocol === "http:" || protocol === "https:"; } var hasOwn = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)); @@ -4672,12 +4672,12 @@ var require_dataURL = __commonJS({ } return { mimeType: mimeTypeRecord, body }; } - function URLSerializer(url, excludeFragment = false) { + function URLSerializer(url2, excludeFragment = false) { if (!excludeFragment) { - return url.href; + return url2.href; } - const href = url.href; - const hashLength = url.hash.length; + const href = url2.href; + const hashLength = url2.hash.length; return hashLength === 0 ? href : href.substring(0, href.length - hashLength); } function collectASequenceOfCodePoints(condition, input, position) { @@ -6984,7 +6984,7 @@ var require_client = __commonJS({ * @param {string|URL} url * @param {import('../types/client').Client.Options} options */ - constructor(url, { + constructor(url2, { interceptors, maxHeaderSize, headersTimeout, @@ -7090,7 +7090,7 @@ var require_client = __commonJS({ }); } this[kInterceptors] = interceptors && interceptors.Client && Array.isArray(interceptors.Client) ? interceptors.Client : [createRedirectInterceptor({ maxRedirections })]; - this[kUrl] = util.parseOrigin(url); + this[kUrl] = util.parseOrigin(url2); this[kConnector] = connect2; this[kSocket] = null; this[kPipelining] = pipelining != null ? pipelining : 1; @@ -10556,10 +10556,10 @@ var require_mock_utils = __commonJS({ }; } function checkNetConnect(netConnect, origin) { - const url = new URL(origin); + const url2 = new URL(origin); if (netConnect === true) { return true; - } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) { + } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url2.host))) { return true; } return false; @@ -12001,16 +12001,16 @@ var require_response = __commonJS({ return responseObject; } // Creates a redirect Response that redirects to url with status status. - static redirect(url, status = 302) { + static redirect(url2, status = 302) { const relevantRealm = { settingsObject: {} }; webidl.argumentLengthCheck(arguments, 1, { header: "Response.redirect" }); - url = webidl.converters.USVString(url); + url2 = webidl.converters.USVString(url2); status = webidl.converters["unsigned short"](status); let parsedURL; try { - parsedURL = new URL(url, getGlobalOrigin()); + parsedURL = new URL(url2, getGlobalOrigin()); } catch (err) { - throw Object.assign(new TypeError("Failed to parse URL from " + url), { + throw Object.assign(new TypeError("Failed to parse URL from " + url2), { cause: err }); } @@ -12054,11 +12054,11 @@ var require_response = __commonJS({ get url() { webidl.brandCheck(this, _Response); const urlList = this[kState].urlList; - const url = urlList[urlList.length - 1] ?? null; - if (url === null) { + const url2 = urlList[urlList.length - 1] ?? null; + if (url2 === null) { return ""; } - return URLSerializer(url, true); + return URLSerializer(url2, true); } // Returns whether response was obtained through a redirect. get redirected() { @@ -13850,12 +13850,12 @@ var require_fetch = __commonJS({ } return response; async function dispatch({ body }) { - const url = requestCurrentURL(request); + const url2 = requestCurrentURL(request); const agent = fetchParams.controller.dispatcher; return new Promise((resolve8, reject) => agent.dispatch( { - path: url.pathname + url.search, - origin: url.origin, + path: url2.pathname + url2.search, + origin: url2.origin, method: request.method, body: fetchParams.controller.dispatcher.isMockActive ? request.body && (request.body.source || request.body.stream) : body, headers: request.headersList.entries, @@ -16335,9 +16335,9 @@ var require_connection = __commonJS({ crypto = require("crypto"); } catch { } - function establishWebSocketConnection(url, protocols, ws, onEstablish, options) { - const requestURL = url; - requestURL.protocol = url.protocol === "ws:" ? "http:" : "https:"; + function establishWebSocketConnection(url2, protocols, ws, onEstablish, options) { + const requestURL = url2; + requestURL.protocol = url2.protocol === "ws:" ? "http:" : "https:"; const request = makeRequest({ urlList: [requestURL], serviceWorkers: "none", @@ -16788,7 +16788,7 @@ var require_websocket = __commonJS({ * @param {string} url * @param {string|string[]} protocols */ - constructor(url, protocols = []) { + constructor(url2, protocols = []) { super(); webidl.argumentLengthCheck(arguments, 1, { header: "WebSocket constructor" }); if (!experimentalWarned) { @@ -16798,12 +16798,12 @@ var require_websocket = __commonJS({ }); } const options = webidl.converters["DOMString or sequence or WebSocketInit"](protocols); - url = webidl.converters.USVString(url); + url2 = webidl.converters.USVString(url2); protocols = options.protocols; const baseURL = getGlobalOrigin(); let urlRecord; try { - urlRecord = new URL(url, baseURL); + urlRecord = new URL(url2, baseURL); } catch (e) { throw new DOMException2(e, "SyntaxError"); } @@ -17198,12 +17198,12 @@ var require_undici = __commonJS({ module2.exports.buildConnector = buildConnector; module2.exports.errors = errors; function makeDispatcher(fn) { - return (url, opts, handler) => { + return (url2, opts, handler) => { if (typeof opts === "function") { handler = opts; opts = null; } - if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) { + if (!url2 || typeof url2 !== "string" && typeof url2 !== "object" && !(url2 instanceof URL)) { throw new InvalidArgumentError("invalid url"); } if (opts != null && typeof opts !== "object") { @@ -17217,12 +17217,12 @@ var require_undici = __commonJS({ if (!opts.path.startsWith("/")) { path16 = `/${path16}`; } - url = new URL(util.parseOrigin(url).origin + path16); + url2 = new URL(util.parseOrigin(url2).origin + path16); } else { if (!opts) { - opts = typeof url === "object" ? url : {}; + opts = typeof url2 === "object" ? url2 : {}; } - url = util.parseURL(url); + url2 = util.parseURL(url2); } const { agent, dispatcher = getGlobalDispatcher() } = opts; if (agent) { @@ -17230,8 +17230,8 @@ var require_undici = __commonJS({ } return fn.call(dispatcher, { ...opts, - origin: url.origin, - path: url.search ? `${url.pathname}${url.search}` : url.pathname, + origin: url2.origin, + path: url2.search ? `${url2.pathname}${url2.search}` : url2.pathname, method: opts.method || (opts.body ? "PUT" : "GET") }, handler); }; @@ -19957,8 +19957,8 @@ var require_utils3 = __commonJS({ exports2.getProxyAgentDispatcher = getProxyAgentDispatcher; function getProxyFetch(destinationUrl) { const httpDispatcher = getProxyAgentDispatcher(destinationUrl); - const proxyFetch = (url, opts) => __awaiter4(this, void 0, void 0, function* () { - return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); + const proxyFetch = (url2, opts) => __awaiter4(this, void 0, void 0, function* () { + return (0, undici_1.fetch)(url2, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); }); return proxyFetch; } @@ -20215,8 +20215,8 @@ var require_dist_node2 = __commonJS({ } function merge2(defaults, route, options) { if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { method, url } : { url: method }, options); + let [method, url2] = route.split(" "); + options = Object.assign(url2 ? { method, url: url2 } : { url: method }, options); } else { options = Object.assign({}, route); } @@ -20234,13 +20234,13 @@ var require_dist_node2 = __commonJS({ } return mergedOptions; } - function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; + function addQueryParameters(url2, parameters) { + const separator = /\?/.test(url2) ? "&" : "?"; const names = Object.keys(parameters); if (names.length === 0) { - return url; + return url2; } - return url + separator + names.map((name) => { + return url2 + separator + names.map((name) => { if (name === "q") { return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); } @@ -20251,8 +20251,8 @@ var require_dist_node2 = __commonJS({ function removeNonChars(variableName) { return variableName.replace(/(?:^\W+)|(?:(? urlVariableNames.includes(option)).concat("baseUrl"); const remainingParameters = omit(parameters, omittedParameters); @@ -20427,7 +20427,7 @@ var require_dist_node2 = __commonJS({ ) ).join(","); } - if (url.endsWith("/graphql")) { + if (url2.endsWith("/graphql")) { if (options.mediaType.previews?.length) { const previewsFromAcceptHeader = headers.accept.match(/(? { @@ -20438,7 +20438,7 @@ var require_dist_node2 = __commonJS({ } } if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); + url2 = addQueryParameters(url2, remainingParameters); } else { if ("data" in remainingParameters) { body = remainingParameters.data; @@ -20455,7 +20455,7 @@ var require_dist_node2 = __commonJS({ body = ""; } return Object.assign( - { method, url, headers }, + { method, url: url2, headers }, typeof body !== "undefined" ? { body } : null, options.request ? { request: options.request } : null ); @@ -20714,7 +20714,7 @@ var require_dist_node5 = __commonJS({ } let headers = {}; let status; - let url; + let url2; let { fetch } = globalThis; if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { fetch = requestOptions.request.fetch; @@ -20734,7 +20734,7 @@ var require_dist_node5 = __commonJS({ // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. ...requestOptions.body && { duplex: "half" } }).then(async (response) => { - url = response.url; + url2 = response.url; status = response.status; for (const keyAndValue of response.headers) { headers[keyAndValue[0]] = keyAndValue[1]; @@ -20755,7 +20755,7 @@ var require_dist_node5 = __commonJS({ } throw new import_request_error.RequestError(response.statusText, status, { response: { - url, + url: url2, status, headers, data: void 0 @@ -20766,7 +20766,7 @@ var require_dist_node5 = __commonJS({ if (status === 304) { throw new import_request_error.RequestError("Not modified", status, { response: { - url, + url: url2, status, headers, data: await getResponseData(response) @@ -20778,7 +20778,7 @@ var require_dist_node5 = __commonJS({ const data = await getResponseData(response); const error2 = new import_request_error.RequestError(toErrorMessage(data), status, { response: { - url, + url: url2, status, headers, data @@ -20791,7 +20791,7 @@ var require_dist_node5 = __commonJS({ }).then((data) => { return { status, - url, + url: url2, headers, data }; @@ -20955,8 +20955,8 @@ var require_dist_node6 = __commonJS({ } function merge2(defaults, route, options) { if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { method, url } : { url: method }, options); + let [method, url2] = route.split(" "); + options = Object.assign(url2 ? { method, url: url2 } : { url: method }, options); } else { options = Object.assign({}, route); } @@ -20974,13 +20974,13 @@ var require_dist_node6 = __commonJS({ } return mergedOptions; } - function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; + function addQueryParameters(url2, parameters) { + const separator = /\?/.test(url2) ? "&" : "?"; const names = Object.keys(parameters); if (names.length === 0) { - return url; + return url2; } - return url + separator + names.map((name) => { + return url2 + separator + names.map((name) => { if (name === "q") { return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); } @@ -20991,8 +20991,8 @@ var require_dist_node6 = __commonJS({ function removeNonChars(variableName) { return variableName.replace(/(?:^\W+)|(?:(? urlVariableNames.includes(option)).concat("baseUrl"); const remainingParameters = omit(parameters, omittedParameters); @@ -21167,7 +21167,7 @@ var require_dist_node6 = __commonJS({ ) ).join(","); } - if (url.endsWith("/graphql")) { + if (url2.endsWith("/graphql")) { if (options.mediaType.previews?.length) { const previewsFromAcceptHeader = headers.accept.match(/(? { @@ -21178,7 +21178,7 @@ var require_dist_node6 = __commonJS({ } } if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); + url2 = addQueryParameters(url2, remainingParameters); } else { if ("data" in remainingParameters) { body = remainingParameters.data; @@ -21195,7 +21195,7 @@ var require_dist_node6 = __commonJS({ body = ""; } return Object.assign( - { method, url, headers }, + { method, url: url2, headers }, typeof body !== "undefined" ? { body } : null, options.request ? { request: options.request } : null ); @@ -21362,7 +21362,7 @@ var require_dist_node8 = __commonJS({ } let headers = {}; let status; - let url; + let url2; let { fetch } = globalThis; if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { fetch = requestOptions.request.fetch; @@ -21382,7 +21382,7 @@ var require_dist_node8 = __commonJS({ // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. ...requestOptions.body && { duplex: "half" } }).then(async (response) => { - url = response.url; + url2 = response.url; status = response.status; for (const keyAndValue of response.headers) { headers[keyAndValue[0]] = keyAndValue[1]; @@ -21403,7 +21403,7 @@ var require_dist_node8 = __commonJS({ } throw new import_request_error.RequestError(response.statusText, status, { response: { - url, + url: url2, status, headers, data: void 0 @@ -21414,7 +21414,7 @@ var require_dist_node8 = __commonJS({ if (status === 304) { throw new import_request_error.RequestError("Not modified", status, { response: { - url, + url: url2, status, headers, data: await getResponseData(response) @@ -21426,7 +21426,7 @@ var require_dist_node8 = __commonJS({ const data = await getResponseData(response); const error2 = new import_request_error.RequestError(toErrorMessage(data), status, { response: { - url, + url: url2, status, headers, data @@ -21439,7 +21439,7 @@ var require_dist_node8 = __commonJS({ }).then((data) => { return { status, - url, + url: url2, headers, data }; @@ -23907,11 +23907,11 @@ var require_dist_node12 = __commonJS({ for (const [scope, endpoints] of Object.entries(endpoints_default)) { for (const [methodName, endpoint] of Object.entries(endpoints)) { const [route, defaults, decorations] = endpoint; - const [method, url] = route.split(/ /); + const [method, url2] = route.split(/ /); const endpointDefaults = Object.assign( { method, - url + url: url2 }, defaults ); @@ -24105,23 +24105,23 @@ var require_dist_node13 = __commonJS({ const requestMethod = typeof route === "function" ? route : octokit.request; const method = options.method; const headers = options.headers; - let url = options.url; + let url2 = options.url; return { [Symbol.asyncIterator]: () => ({ async next() { - if (!url) + if (!url2) return { done: true }; try { - const response = await requestMethod({ method, url, headers }); + const response = await requestMethod({ method, url: url2, headers }); const normalizedResponse = normalizePaginatedListResponse(response); - url = ((normalizedResponse.headers.link || "").match( + url2 = ((normalizedResponse.headers.link || "").match( /<([^<>]+)>;\s*rel="next"/ ) || [])[1]; return { value: normalizedResponse }; } catch (error2) { if (error2.status !== 409) throw error2; - url = ""; + url2 = ""; return { value: { status: 200, @@ -36289,7 +36289,6 @@ var require_package = __commonJS({ "console-log-level": "^1.4.1", del: "^6.1.1", "fast-deep-equal": "^3.1.3", - "file-url": "^3.0.0", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", @@ -41100,16 +41099,16 @@ var require_sanitizer = __commonJS({ if (typeof value !== "string" || value === null || value === "") { return value; } - const url = new URL(value); - if (!url.search) { + const url2 = new URL(value); + if (!url2.search) { return value; } - for (const [key] of url.searchParams) { + for (const [key] of url2.searchParams) { if (!this.allowedQueryParameters.has(key.toLowerCase())) { - url.searchParams.set(key, RedactedString); + url2.searchParams.set(key, RedactedString); } } - return url.toString(); + return url2.toString(); } sanitizeHeaders(obj) { const sanitized = {}; @@ -41198,8 +41197,8 @@ var require_redirectPolicy = __commonJS({ const { request, status, headers } = response; const locationHeader = headers.get("location"); if (locationHeader && (status === 300 || status === 301 && allowedRedirect.includes(request.method) || status === 302 && allowedRedirect.includes(request.method) || status === 303 && request.method === "POST" || status === 307) && currentRetries < maxRetries) { - const url = new URL(locationHeader, request.url); - request.url = url.toString(); + const url2 = new URL(locationHeader, request.url); + request.url = url2.toString(); if (status === 303) { request.method = "GET"; request.headers.delete("Content-Length"); @@ -43403,9 +43402,9 @@ var require_helpers2 = __commonJS({ } } exports2.json = json2; - function req(url, opts = {}) { - const href = typeof url === "string" ? url : url.href; - const req2 = (href.startsWith("https:") ? https2 : http).request(url, opts); + function req(url2, opts = {}) { + const href = typeof url2 === "string" ? url2 : url2.href; + const req2 = (href.startsWith("https:") ? https2 : http).request(url2, opts); const promise = new Promise((resolve8, reject) => { req2.once("response", resolve8).once("error", reject).end(); }); @@ -43885,11 +43884,11 @@ var require_dist4 = __commonJS({ const protocol = opts.secureEndpoint ? "https:" : "http:"; const hostname = req.getHeader("host") || "localhost"; const base = `${protocol}//${hostname}`; - const url = new url_1.URL(req.path, base); + const url2 = new url_1.URL(req.path, base); if (opts.port !== 80) { - url.port = String(opts.port); + url2.port = String(opts.port); } - req.path = String(url); + req.path = String(url2); const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders }; if (proxy.username || proxy.password) { const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; @@ -44060,8 +44059,8 @@ var require_proxyPolicy = __commonJS({ if (request.agent) { return; } - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; + const url2 = new URL(request.url); + const isInsecure = url2.protocol !== "https:"; if (request.tlsSettings) { log_js_1.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored."); } @@ -44708,17 +44707,17 @@ var require_nodeHttpClient = __commonJS({ } makeRequest(request, abortController, body) { var _a; - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; + const url2 = new URL(request.url); + const isInsecure = url2.protocol !== "https:"; if (isInsecure && !request.allowInsecureConnection) { throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); } const agent = (_a = request.agent) !== null && _a !== void 0 ? _a : this.getOrCreateAgent(request, isInsecure); const options = { agent, - hostname: url.hostname, - path: `${url.pathname}${url.search}`, - port: url.port, + hostname: url2.hostname, + path: `${url2.pathname}${url2.search}`, + port: url2.port, method: request.method, headers: request.headers.toJSON({ preserveCase: true }) }; @@ -48097,14 +48096,14 @@ var require_urlHelpers = __commonJS({ } return result; } - function isAbsoluteUrl(url) { - return url.includes("://"); + function isAbsoluteUrl(url2) { + return url2.includes("://"); } - function appendPath(url, pathToAppend) { + function appendPath(url2, pathToAppend) { if (!pathToAppend) { - return url; + return url2; } - const parsedUrl = new URL(url); + const parsedUrl = new URL(url2); let newPath = parsedUrl.pathname; if (!newPath.endsWith("/")) { newPath = `${newPath}/`; @@ -48195,11 +48194,11 @@ var require_urlHelpers = __commonJS({ } return result; } - function appendQueryParams(url, queryParams, sequenceParams, noOverwrite = false) { + function appendQueryParams(url2, queryParams, sequenceParams, noOverwrite = false) { if (queryParams.size === 0) { - return url; + return url2; } - const parsedUrl = new URL(url); + const parsedUrl = new URL(url2); const combinedParams = simpleParseQueryParams(parsedUrl.search); for (const [name, value] of queryParams) { const existingValue = combinedParams.get(name); @@ -48310,9 +48309,9 @@ var require_serviceClient = __commonJS({ if (!endpoint) { throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use."); } - const url = (0, urlHelpers_js_1.getRequestUrl)(endpoint, operationSpec, operationArguments, this); + const url2 = (0, urlHelpers_js_1.getRequestUrl)(endpoint, operationSpec, operationArguments, this); const request = (0, core_rest_pipeline_1.createPipelineRequest)({ - url + url: url2 }); request.method = operationSpec.httpMethod; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); @@ -52263,8 +52262,8 @@ var require_dist7 = __commonJS({ "11103", "11104" ]; - function escapeURLPath(url2) { - const urlParsed = new URL(url2); + function escapeURLPath(url3) { + const urlParsed = new URL(url3); let path16 = urlParsed.pathname; path16 = path16 || "/"; path16 = escape(path16); @@ -52351,15 +52350,15 @@ var require_dist7 = __commonJS({ function escape(text) { return encodeURIComponent(text).replace(/%2F/g, "/").replace(/'/g, "%27").replace(/\+/g, "%20").replace(/%25/g, "%"); } - function appendToURLPath(url2, name) { - const urlParsed = new URL(url2); + function appendToURLPath(url3, name) { + const urlParsed = new URL(url3); let path16 = urlParsed.pathname; path16 = path16 ? path16.endsWith("/") ? `${path16}${name}` : `${path16}/${name}` : name; urlParsed.pathname = path16; return urlParsed.toString(); } - function setURLParameter(url2, name, value) { - const urlParsed = new URL(url2); + function setURLParameter(url3, name, value) { + const urlParsed = new URL(url3); const encodedName = encodeURIComponent(name); const encodedValue = value ? encodeURIComponent(value) : void 0; const searchString = urlParsed.search === "" ? "?" : urlParsed.search; @@ -52378,34 +52377,34 @@ var require_dist7 = __commonJS({ urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return urlParsed.toString(); } - function getURLParameter(url2, name) { + function getURLParameter(url3, name) { var _a; - const urlParsed = new URL(url2); + const urlParsed = new URL(url3); return (_a = urlParsed.searchParams.get(name)) !== null && _a !== void 0 ? _a : void 0; } - function setURLHost(url2, host) { - const urlParsed = new URL(url2); + function setURLHost(url3, host) { + const urlParsed = new URL(url3); urlParsed.hostname = host; return urlParsed.toString(); } - function getURLPath(url2) { + function getURLPath(url3) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url3); return urlParsed.pathname; } catch (e) { return void 0; } } - function getURLScheme(url2) { + function getURLScheme(url3) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url3); return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; } catch (e) { return void 0; } } - function getURLPathAndQuery(url2) { - const urlParsed = new URL(url2); + function getURLPathAndQuery(url3) { + const urlParsed = new URL(url3); const pathString = urlParsed.pathname; if (!pathString) { throw new RangeError("Invalid url without valid path."); @@ -52417,8 +52416,8 @@ var require_dist7 = __commonJS({ } return `${pathString}${queryString}`; } - function getURLQueries(url2) { - let queryString = new URL(url2).search; + function getURLQueries(url3) { + let queryString = new URL(url3).search; if (!queryString) { return {}; } @@ -52439,8 +52438,8 @@ var require_dist7 = __commonJS({ } return queries; } - function appendToURLQuery(url2, queryParts) { - const urlParsed = new URL(url2); + function appendToURLQuery(url3, queryParts) { + const urlParsed = new URL(url3); let query = urlParsed.search; if (query) { query += "&" + queryParts; @@ -52506,8 +52505,8 @@ var require_dist7 = __commonJS({ function iEqual(str1, str2) { return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } - function getAccountNameFromUrl(url2) { - const parsedUrl = new URL(url2); + function getAccountNameFromUrl(url3) { + const parsedUrl = new URL(url3); let accountName; try { if (parsedUrl.hostname.split(".")[1] === "blob") { @@ -62445,7 +62444,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var url = { + var url2 = { parameterPath: "url", mapper: { serializedName: "url", @@ -64121,7 +64120,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp, timeoutInSeconds ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -64151,7 +64150,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp, timeoutInSeconds ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64178,7 +64177,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, comp1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64208,7 +64207,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; maxPageSize, include ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64236,7 +64235,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, comp3 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -64265,7 +64264,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, restype1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64292,7 +64291,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body, queryParameters: [timeoutInSeconds, comp4], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ accept, version, @@ -64325,7 +64324,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp5, where ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64513,7 +64512,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64539,7 +64538,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64562,7 +64561,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64591,7 +64590,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp6 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64632,7 +64631,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp7 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64660,7 +64659,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp7 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -64693,7 +64692,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp8 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64721,7 +64720,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp9 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64754,7 +64753,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp4, restype2 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ accept, version, @@ -64788,7 +64787,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; where, restype2 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64814,7 +64813,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64845,7 +64844,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64875,7 +64874,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64905,7 +64904,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64935,7 +64934,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64971,7 +64970,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, include1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65003,7 +65002,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; include1, delimiter ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65029,7 +65028,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, restype1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65293,7 +65292,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, versionId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65331,7 +65330,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, versionId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65367,7 +65366,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, blobDeleteType ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65396,7 +65395,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp8], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65418,7 +65417,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp11], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65442,7 +65441,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65476,7 +65475,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65501,7 +65500,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65523,7 +65522,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp13], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65546,7 +65545,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp6], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65579,7 +65578,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65609,7 +65608,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65638,7 +65637,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65667,7 +65666,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65697,7 +65696,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65726,7 +65725,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp14], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65759,7 +65758,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65801,7 +65800,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65849,7 +65848,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp15, copyId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65881,7 +65880,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, comp16 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65911,7 +65910,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, restype1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65949,7 +65948,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, comp17 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -65989,7 +65988,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, comp18 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66018,7 +66017,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, comp18 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -66152,7 +66151,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66201,7 +66200,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body1, queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66244,7 +66243,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66282,7 +66281,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66336,7 +66335,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, comp20 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66373,7 +66372,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp20, prevsnapshot ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66403,7 +66402,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66436,7 +66435,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66466,7 +66465,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp21], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66547,7 +66546,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66593,7 +66592,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body1, queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66633,7 +66632,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66678,7 +66677,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp23], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66798,7 +66797,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body1, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66849,7 +66848,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66908,7 +66907,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp24, blockId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66945,7 +66944,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp24, blockId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66983,7 +66982,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: blocks, queryParameters: [timeoutInSeconds, comp25], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -67038,7 +67037,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp25, listType ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67056,9 +67055,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * operation. * @param options The parameter options */ - constructor(url2, options) { + constructor(url3, options) { var _a, _b; - if (url2 === void 0) { + if (url3 === void 0) { throw new Error("'url' cannot be null"); } if (!options) { @@ -67073,7 +67072,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; userAgentPrefix }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{url}" }); super(optionsWithDefaults); - this.url = url2; + this.url = url3; this.version = options.version || "2024-11-04"; this.service = new ServiceImpl(this); this.container = new ContainerImpl(this); @@ -67098,9 +67097,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param url - url to resource * @param pipeline - request policy pipeline. */ - constructor(url2, pipeline) { - this.url = escapeURLPath(url2); - this.accountName = getAccountNameFromUrl(url2); + constructor(url3, pipeline) { + this.url = escapeURLPath(url3); + this.accountName = getAccountNameFromUrl(url3); this.pipeline = pipeline; this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline)); this.isHttps = iEqual(getURLScheme(this.url) || "", "https"); @@ -70358,16 +70357,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { options = options || {}; let pipeline; - let url2; + let url3; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } @@ -70379,7 +70378,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -70388,7 +70387,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -70396,7 +70395,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); ({ blobName: this._name, containerName: this._containerName } = this.getBlobAndContainerNamesFromUrl()); this.blobContext = this.storageClientContext.blob; this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT); @@ -71244,17 +71243,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; var AppendBlobClient = class _AppendBlobClient extends BlobClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(new AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; @@ -71263,7 +71262,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -71272,7 +71271,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -71280,7 +71279,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); this.appendBlobContext = this.storageClientContext.appendBlob; } /** @@ -71459,17 +71458,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; var BlockBlobClient = class _BlockBlobClient extends BlobClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } @@ -71481,7 +71480,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -71490,7 +71489,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -71498,7 +71497,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); this.blockBlobContext = this.storageClientContext.blockBlob; this._blobContext = this.storageClientContext.blob; } @@ -72006,17 +72005,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; var PageBlobClient = class _PageBlobClient extends BlobClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(new AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; @@ -72025,7 +72024,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -72034,7 +72033,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -72042,7 +72041,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); this.pageBlobContext = this.storageClientContext.pageBlob; } /** @@ -72913,13 +72912,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { - let url2; + let url3; let credential; if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrOptions instanceof StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrOptions))) { - url2 = urlOrBlobClient; + url3 = urlOrBlobClient; credential = credentialOrOptions; } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + url3 = urlOrBlobClient.url; credential = urlOrBlobClient.credential; options = credentialOrOptions; } else { @@ -72931,23 +72930,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("delete"); await this.addSubRequestInternal({ - url: url2, + url: url3, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).delete(updatedOptions); + await new BlobClient(url3, this.batchRequest.createPipeline(credential)).delete(updatedOptions); }); }); } async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { - let url2; + let url3; let credential; let tier2; if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrTier instanceof StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrTier))) { - url2 = urlOrBlobClient; + url3 = urlOrBlobClient; credential = credentialOrTier; tier2 = tierOrOptions; } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + url3 = urlOrBlobClient.url; credential = urlOrBlobClient.credential; tier2 = credentialOrTier; options = tierOrOptions; @@ -72960,10 +72959,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("setAccessTier"); await this.addSubRequestInternal({ - url: url2, + url: url3, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); + await new BlobClient(url3, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); }); }); } @@ -73086,7 +73085,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } var BlobBatchClient = class { - constructor(url2, credentialOrPipeline, options) { + constructor(url3, credentialOrPipeline, options) { let pipeline; if (isPipelineLike(credentialOrPipeline)) { pipeline = credentialOrPipeline; @@ -73095,8 +73094,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { pipeline = newPipeline(credentialOrPipeline, options); } - const storageClientContext = new StorageContextClient(url2, getCoreClientOptions(pipeline)); - const path16 = getURLPath(url2); + const storageClientContext = new StorageContextClient(url3, getCoreClientOptions(pipeline)); + const path16 = getURLPath(url3); if (path16 && path16 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { @@ -73200,16 +73199,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(new AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string") { const containerName = credentialOrPipelineOrContainerName; @@ -73217,7 +73216,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); + url3 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -73226,7 +73225,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -73234,7 +73233,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName parameter"); } - super(url2, pipeline); + super(url3, pipeline); this._containerName = this.getContainerNameFromUrl(); this.containerContext = this.storageClientContext.container; } @@ -74683,7 +74682,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } - constructor(url2, credentialOrPipeline, options) { + constructor(url3, credentialOrPipeline, options) { let pipeline; if (isPipelineLike(credentialOrPipeline)) { pipeline = credentialOrPipeline; @@ -74692,7 +74691,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { pipeline = newPipeline(new AnonymousCredential(), options); } - super(url2, pipeline); + super(url3, pipeline); this.serviceContext = this.storageClientContext.service; } /** @@ -76454,9 +76453,9 @@ var require_cacheHttpClient = __commonJS({ if (!baseUrl) { throw new Error("Cache Service Url not found, unable to restore cache."); } - const url = `${baseUrl}_apis/artifactcache/${resource}`; - core15.debug(`Resource Url: ${url}`); - return url; + const url2 = `${baseUrl}_apis/artifactcache/${resource}`; + core15.debug(`Resource Url: ${url2}`); + return url2; } function createAcceptHeader(type2, apiVersion) { return `${type2};api-version=${apiVersion}`; @@ -81550,18 +81549,18 @@ var require_util10 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.maskSecretUrls = exports2.maskSigUrl = void 0; var core_1 = require_core(); - function maskSigUrl(url) { - if (!url) + function maskSigUrl(url2) { + if (!url2) return; try { - const parsedUrl = new URL(url); + const parsedUrl = new URL(url2); const signature = parsedUrl.searchParams.get("sig"); if (signature) { (0, core_1.setSecret)(signature); (0, core_1.setSecret)(encodeURIComponent(signature)); } } catch (error2) { - (0, core_1.debug)(`Failed to parse URL: ${url} ${error2 instanceof Error ? error2.message : String(error2)}`); + (0, core_1.debug)(`Failed to parse URL: ${url2} ${error2 instanceof Error ? error2.message : String(error2)}`); } } exports2.maskSigUrl = maskSigUrl; @@ -81647,14 +81646,14 @@ var require_cacheTwirpClient = __commonJS({ // JSON generated client. request(service, method, contentType, data) { return __awaiter4(this, void 0, void 0, function* () { - const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; - (0, core_1.debug)(`[Request] ${method} ${url}`); + const url2 = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; + (0, core_1.debug)(`[Request] ${method} ${url2}`); const headers = { "Content-Type": contentType }; try { const { body } = yield this.retryableRequest(() => __awaiter4(this, void 0, void 0, function* () { - return this.httpClient.post(url, JSON.stringify(data), headers); + return this.httpClient.post(url2, JSON.stringify(data), headers); })); return body; } catch (error2) { @@ -82747,18 +82746,18 @@ var require_tool_cache = __commonJS({ var IS_WINDOWS = process.platform === "win32"; var IS_MAC = process.platform === "darwin"; var userAgent = "actions/tool-cache"; - function downloadTool2(url, dest, auth, headers) { + function downloadTool2(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { dest = dest || path16.join(_getTempDirectory(), crypto.randomUUID()); yield io7.mkdirP(path16.dirname(dest)); - core15.debug(`Downloading ${url}`); + core15.debug(`Downloading ${url2}`); core15.debug(`Destination ${dest}`); const maxAttempts = 3; const minSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS", 10); const maxSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS", 20); const retryHelper = new retry_helper_1.RetryHelper(maxAttempts, minSeconds, maxSeconds); return yield retryHelper.execute(() => __awaiter4(this, void 0, void 0, function* () { - return yield downloadToolAttempt(url, dest || "", auth, headers); + return yield downloadToolAttempt(url2, dest || "", auth, headers); }), (err) => { if (err instanceof HTTPError && err.httpStatusCode) { if (err.httpStatusCode < 500 && err.httpStatusCode !== 408 && err.httpStatusCode !== 429) { @@ -82770,7 +82769,7 @@ var require_tool_cache = __commonJS({ }); } exports2.downloadTool = downloadTool2; - function downloadToolAttempt(url, dest, auth, headers) { + function downloadToolAttempt(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { if (fs17.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); @@ -82785,10 +82784,10 @@ var require_tool_cache = __commonJS({ } headers.authorization = auth; } - const response = yield http.get(url, headers); + const response = yield http.get(url2, headers); if (response.message.statusCode !== 200) { const err = new HTTPError(response.message.statusCode); - core15.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); + core15.debug(`Failed to download from "${url2}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); throw err; } const pipeline = util.promisify(stream2.pipeline); @@ -83264,8 +83263,8 @@ var require_debug2 = __commonJS({ // node_modules/follow-redirects/index.js var require_follow_redirects = __commonJS({ "node_modules/follow-redirects/index.js"(exports2, module2) { - var url = require("url"); - var URL2 = url.URL; + var url2 = require("url"); + var URL2 = url2.URL; var http = require("http"); var https2 = require("https"); var Writable = require("stream").Writable; @@ -83517,7 +83516,7 @@ var require_follow_redirects = __commonJS({ for (var event of events) { request.on(event, eventHandlers[event]); } - this._currentUrl = /^\//.test(this._options.path) ? url.format(this._options) : ( + this._currentUrl = /^\//.test(this._options.path) ? url2.format(this._options) : ( // When making a request to a proxy, […] // a client MUST send the target URI in absolute-form […]. this._options.path @@ -83585,7 +83584,7 @@ var require_follow_redirects = __commonJS({ var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); var currentUrlParts = parseUrl(this._currentUrl); var currentHost = currentHostHeader || currentUrlParts.host; - var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url.format(Object.assign(currentUrlParts, { host: currentHost })); + var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url2.format(Object.assign(currentUrlParts, { host: currentHost })); var redirectUrl = resolveUrl(location, currentUrl); debug3("redirecting to", redirectUrl.href); this._isRedirect = true; @@ -83663,7 +83662,7 @@ var require_follow_redirects = __commonJS({ if (useNativeURL) { parsed = new URL2(input); } else { - parsed = validateUrl(url.parse(input)); + parsed = validateUrl(url2.parse(input)); if (!isString(parsed.protocol)) { throw new InvalidUrlError({ input }); } @@ -83671,7 +83670,7 @@ var require_follow_redirects = __commonJS({ return parsed; } function resolveUrl(relative2, base) { - return useNativeURL ? new URL2(relative2, base) : parseUrl(url.resolve(base, relative2)); + return useNativeURL ? new URL2(relative2, base) : parseUrl(url2.resolve(base, relative2)); } function validateUrl(input) { if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { @@ -84854,32 +84853,6 @@ var require_glob3 = __commonJS({ } }); -// node_modules/file-url/index.js -var require_file_url = __commonJS({ - "node_modules/file-url/index.js"(exports2, module2) { - "use strict"; - var path16 = require("path"); - module2.exports = (filePath, options) => { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - options = { - resolve: true, - ...options - }; - let pathName = filePath; - if (options.resolve) { - pathName = path16.resolve(filePath); - } - pathName = pathName.replace(/\\/g, "/"); - if (pathName[0] !== "/") { - pathName = `/${pathName}`; - } - return encodeURI(`file://${pathName}`).replace(/[?#]/g, encodeURIComponent); - }; - } -}); - // node_modules/jsonschema/lib/helpers.js var require_helpers3 = __commonJS({ "node_modules/jsonschema/lib/helpers.js"(exports2, module2) { @@ -92118,25 +92091,25 @@ function parseGitHubUrl(inputUrl) { if (!inputUrl.startsWith("http://") && !inputUrl.startsWith("https://")) { throw new ConfigurationError(`"${originalUrl}" is not a http or https URL`); } - let url; + let url2; try { - url = new URL(inputUrl); + url2 = new URL(inputUrl); } catch { throw new ConfigurationError(`"${originalUrl}" is not a valid URL`); } - if (url.hostname === "github.com" || url.hostname === "api.github.com") { + if (url2.hostname === "github.com" || url2.hostname === "api.github.com") { return GITHUB_DOTCOM_URL; } - if (url.pathname.indexOf("/api/v3") !== -1) { - url.pathname = url.pathname.substring(0, url.pathname.indexOf("/api/v3")); + if (url2.pathname.indexOf("/api/v3") !== -1) { + url2.pathname = url2.pathname.substring(0, url2.pathname.indexOf("/api/v3")); } - if (url.hostname.startsWith("api.")) { - url.hostname = url.hostname.substring(4); + if (url2.hostname.startsWith("api.")) { + url2.hostname = url2.hostname.substring(4); } - if (!url.pathname.endsWith("/")) { - url.pathname = `${url.pathname}/`; + if (!url2.pathname.endsWith("/")) { + url2.pathname = `${url2.pathname}/`; } - return url.toString(); + return url2.toString(); } var ExhaustivityCheckingError = class extends Error { constructor(expectedExhaustiveValue) { @@ -94480,10 +94453,10 @@ function writeToolcacheMarkerFile(extractedPath, logger) { fs8.writeFileSync(markerFilePath, ""); logger.info(`Created toolcache marker file ${markerFilePath}`); } -function sanitizeUrlForStatusReport(url) { +function sanitizeUrlForStatusReport(url2) { return ["github/codeql-action", "dsp-testing/codeql-cli-nightlies"].some( - (repo) => url.startsWith(`https://github.com/${repo}/releases/download/`) - ) ? url : "sanitized-value"; + (repo) => url2.startsWith(`https://github.com/${repo}/releases/download/`) + ) ? url2 : "sanitized-value"; } // src/setup-codeql.ts @@ -94574,16 +94547,16 @@ function tryGetBundleVersionFromTagName(tagName, logger) { } return match[1]; } -function tryGetTagNameFromUrl(url, logger) { - const matches = [...url.matchAll(/\/(codeql-bundle-[^/]*)\//g)]; +function tryGetTagNameFromUrl(url2, logger) { + const matches = [...url2.matchAll(/\/(codeql-bundle-[^/]*)\//g)]; if (matches.length === 0) { - logger.debug(`Could not determine tag name for URL ${url}.`); + logger.debug(`Could not determine tag name for URL ${url2}.`); return void 0; } const match = matches[matches.length - 1]; if (match === null || match.length !== 2) { logger.debug( - `Could not determine tag name for URL ${url}. Matched ${JSON.stringify( + `Could not determine tag name for URL ${url2}. Matched ${JSON.stringify( match )}.` ); @@ -94659,13 +94632,13 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian } let cliVersion2; let tagName; - let url; + let url2; if (forceShippedTools) { cliVersion2 = cliVersion; tagName = bundleVersion; } else if (toolsInput !== void 0) { tagName = tryGetTagNameFromUrl(toolsInput, logger); - url = toolsInput; + url2 = toolsInput; if (tagName) { const bundleVersion3 = tryGetBundleVersionFromTagName(tagName, logger); if (bundleVersion3 && semver7.valid(bundleVersion3)) { @@ -94677,9 +94650,9 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian tagName = defaultCliVersion.tagName; } const bundleVersion2 = tagName && tryGetBundleVersionFromTagName(tagName, logger); - const humanReadableVersion = cliVersion2 ?? (bundleVersion2 && convertToSemVer(bundleVersion2, logger)) ?? tagName ?? url ?? "unknown"; + const humanReadableVersion = cliVersion2 ?? (bundleVersion2 && convertToSemVer(bundleVersion2, logger)) ?? tagName ?? url2 ?? "unknown"; logger.debug( - `Attempting to obtain CodeQL tools. CLI version: ${cliVersion2 ?? "unknown"}, bundle tag name: ${tagName ?? "unknown"}, URL: ${url ?? "unspecified"}.` + `Attempting to obtain CodeQL tools. CLI version: ${cliVersion2 ?? "unknown"}, bundle tag name: ${tagName ?? "unknown"}, URL: ${url2 ?? "unspecified"}.` ); let codeqlFolder; if (cliVersion2) { @@ -94761,32 +94734,32 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian } } let compressionMethod; - if (!url) { + if (!url2) { compressionMethod = cliVersion2 !== void 0 && await useZstdBundle(cliVersion2, tarSupportsZstd) ? "zstd" : "gzip"; - url = await getCodeQLBundleDownloadURL( + url2 = await getCodeQLBundleDownloadURL( tagName, apiDetails, compressionMethod, logger ); } else { - const method = inferCompressionMethod(url); + const method = inferCompressionMethod(url2); if (method === void 0) { throw new ConfigurationError( - `Could not infer compression method from URL ${url}. Please specify a URL ending in '.tar.gz' or '.tar.zst'.` + `Could not infer compression method from URL ${url2}. Please specify a URL ending in '.tar.gz' or '.tar.zst'.` ); } compressionMethod = method; } if (cliVersion2) { - logger.info(`Using CodeQL CLI version ${cliVersion2} sourced from ${url} .`); + logger.info(`Using CodeQL CLI version ${cliVersion2} sourced from ${url2} .`); } else { - logger.info(`Using CodeQL CLI sourced from ${url} .`); + logger.info(`Using CodeQL CLI sourced from ${url2} .`); } return { bundleVersion: tagName && tryGetBundleVersionFromTagName(tagName, logger), cliVersion: cliVersion2, - codeqlURL: url, + codeqlURL: url2, compressionMethod, sourceType: "download", toolsVersion: cliVersion2 ?? humanReadableVersion @@ -96496,9 +96469,9 @@ async function sendStatusReport(statusReport) { // src/upload-lib.ts var fs15 = __toESM(require("fs")); var path14 = __toESM(require("path")); +var url = __toESM(require("url")); var import_zlib = __toESM(require("zlib")); var core13 = __toESM(require_core()); -var import_file_url = __toESM(require_file_url()); var jsonschema = __toESM(require_lib2()); // src/fingerprints.ts @@ -98074,7 +98047,7 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features const sarifPayload = JSON.stringify(sarif); logger.debug(`Compressing serialized SARIF`); const zippedSarif = import_zlib.default.gzipSync(sarifPayload).toString("base64"); - const checkoutURI = (0, import_file_url.default)(checkoutPath); + const checkoutURI = url.pathToFileURL(checkoutPath).href; const payload = buildPayload( await getCommitOid(checkoutPath), await getRef(), diff --git a/lib/autobuild-action.js b/lib/autobuild-action.js index ea7cbdbc3..83691a20e 100644 --- a/lib/autobuild-action.js +++ b/lib/autobuild-action.js @@ -36289,7 +36289,6 @@ var require_package = __commonJS({ "console-log-level": "^1.4.1", del: "^6.1.1", "fast-deep-equal": "^3.1.3", - "file-url": "^3.0.0", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", diff --git a/lib/init-action-post.js b/lib/init-action-post.js index d013d7b12..e2c783654 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -283,8 +283,8 @@ var require_proxy = __commonJS({ return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); } var DecodedURL = class extends URL { - constructor(url, base) { - super(url, base); + constructor(url2, base) { + super(url2, base); this._decodedUsername = decodeURIComponent(super.username); this._decodedPassword = decodeURIComponent(super.password); } @@ -957,65 +957,65 @@ var require_util = __commonJS({ function isBlobLike(object) { return Blob2 && object instanceof Blob2 || object && typeof object === "object" && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && /^(Blob|File)$/.test(object[Symbol.toStringTag]); } - function buildURL(url, queryParams) { - if (url.includes("?") || url.includes("#")) { + function buildURL(url2, queryParams) { + if (url2.includes("?") || url2.includes("#")) { throw new Error('Query params cannot be passed when url already contains "?" or "#".'); } const stringified = stringify(queryParams); if (stringified) { - url += "?" + stringified; + url2 += "?" + stringified; } - return url; + return url2; } - function parseURL(url) { - if (typeof url === "string") { - url = new URL(url); - if (!/^https?:/.test(url.origin || url.protocol)) { + function parseURL(url2) { + if (typeof url2 === "string") { + url2 = new URL(url2); + if (!/^https?:/.test(url2.origin || url2.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - return url; + return url2; } - if (!url || typeof url !== "object") { + if (!url2 || typeof url2 !== "object") { throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); } - if (!/^https?:/.test(url.origin || url.protocol)) { + if (!/^https?:/.test(url2.origin || url2.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - if (!(url instanceof URL)) { - if (url.port != null && url.port !== "" && !Number.isFinite(parseInt(url.port))) { + if (!(url2 instanceof URL)) { + if (url2.port != null && url2.port !== "" && !Number.isFinite(parseInt(url2.port))) { throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); } - if (url.path != null && typeof url.path !== "string") { + if (url2.path != null && typeof url2.path !== "string") { throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); } - if (url.pathname != null && typeof url.pathname !== "string") { + if (url2.pathname != null && typeof url2.pathname !== "string") { throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); } - if (url.hostname != null && typeof url.hostname !== "string") { + if (url2.hostname != null && typeof url2.hostname !== "string") { throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); } - if (url.origin != null && typeof url.origin !== "string") { + if (url2.origin != null && typeof url2.origin !== "string") { throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); } - const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; - let origin = url.origin != null ? url.origin : `${url.protocol}//${url.hostname}:${port}`; - let path15 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + const port = url2.port != null ? url2.port : url2.protocol === "https:" ? 443 : 80; + let origin = url2.origin != null ? url2.origin : `${url2.protocol}//${url2.hostname}:${port}`; + let path15 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; if (origin.endsWith("/")) { origin = origin.substring(0, origin.length - 1); } if (path15 && !path15.startsWith("/")) { path15 = `/${path15}`; } - url = new URL(origin + path15); + url2 = new URL(origin + path15); } - return url; + return url2; } - function parseOrigin(url) { - url = parseURL(url); - if (url.pathname !== "/" || url.search || url.hash) { + function parseOrigin(url2) { + url2 = parseURL(url2); + if (url2.pathname !== "/" || url2.search || url2.hash) { throw new InvalidArgumentError("invalid url"); } - return url; + return url2; } function getHostname(host) { if (host[0] === "[") { @@ -3666,8 +3666,8 @@ var require_util2 = __commonJS({ return request.urlList[request.urlList.length - 1]; } function requestBadPort(request) { - const url = requestCurrentURL(request); - if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { + const url2 = requestCurrentURL(request); + if (urlIsHttpHttpsScheme(url2) && badPortsSet.has(url2.port)) { return "blocked"; } return "allowed"; @@ -3881,30 +3881,30 @@ var require_util2 = __commonJS({ return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; } } - function stripURLForReferrer(url, originOnly) { - assert(url instanceof URL); - if (url.protocol === "file:" || url.protocol === "about:" || url.protocol === "blank:") { + function stripURLForReferrer(url2, originOnly) { + assert(url2 instanceof URL); + if (url2.protocol === "file:" || url2.protocol === "about:" || url2.protocol === "blank:") { return "no-referrer"; } - url.username = ""; - url.password = ""; - url.hash = ""; + url2.username = ""; + url2.password = ""; + url2.hash = ""; if (originOnly) { - url.pathname = ""; - url.search = ""; + url2.pathname = ""; + url2.search = ""; } - return url; + return url2; } - function isURLPotentiallyTrustworthy(url) { - if (!(url instanceof URL)) { + function isURLPotentiallyTrustworthy(url2) { + if (!(url2 instanceof URL)) { return false; } - if (url.href === "about:blank" || url.href === "about:srcdoc") { + if (url2.href === "about:blank" || url2.href === "about:srcdoc") { return true; } - if (url.protocol === "data:") return true; - if (url.protocol === "file:") return true; - return isOriginPotentiallyTrustworthy(url.origin); + if (url2.protocol === "data:") return true; + if (url2.protocol === "file:") return true; + return isOriginPotentiallyTrustworthy(url2.origin); function isOriginPotentiallyTrustworthy(origin) { if (origin == null || origin === "null") return false; const originAsURL = new URL(origin); @@ -4174,20 +4174,20 @@ var require_util2 = __commonJS({ byteLength += chunk.length; } } - function urlIsLocal(url) { - assert("protocol" in url); - const protocol = url.protocol; + function urlIsLocal(url2) { + assert("protocol" in url2); + const protocol = url2.protocol; return protocol === "about:" || protocol === "blob:" || protocol === "data:"; } - function urlHasHttpsScheme(url) { - if (typeof url === "string") { - return url.startsWith("https:"); + function urlHasHttpsScheme(url2) { + if (typeof url2 === "string") { + return url2.startsWith("https:"); } - return url.protocol === "https:"; + return url2.protocol === "https:"; } - function urlIsHttpHttpsScheme(url) { - assert("protocol" in url); - const protocol = url.protocol; + function urlIsHttpHttpsScheme(url2) { + assert("protocol" in url2); + const protocol = url2.protocol; return protocol === "http:" || protocol === "https:"; } var hasOwn = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)); @@ -4672,12 +4672,12 @@ var require_dataURL = __commonJS({ } return { mimeType: mimeTypeRecord, body }; } - function URLSerializer(url, excludeFragment = false) { + function URLSerializer(url2, excludeFragment = false) { if (!excludeFragment) { - return url.href; + return url2.href; } - const href = url.href; - const hashLength = url.hash.length; + const href = url2.href; + const hashLength = url2.hash.length; return hashLength === 0 ? href : href.substring(0, href.length - hashLength); } function collectASequenceOfCodePoints(condition, input, position) { @@ -6984,7 +6984,7 @@ var require_client = __commonJS({ * @param {string|URL} url * @param {import('../types/client').Client.Options} options */ - constructor(url, { + constructor(url2, { interceptors, maxHeaderSize, headersTimeout, @@ -7090,7 +7090,7 @@ var require_client = __commonJS({ }); } this[kInterceptors] = interceptors && interceptors.Client && Array.isArray(interceptors.Client) ? interceptors.Client : [createRedirectInterceptor({ maxRedirections })]; - this[kUrl] = util.parseOrigin(url); + this[kUrl] = util.parseOrigin(url2); this[kConnector] = connect2; this[kSocket] = null; this[kPipelining] = pipelining != null ? pipelining : 1; @@ -10556,10 +10556,10 @@ var require_mock_utils = __commonJS({ }; } function checkNetConnect(netConnect, origin) { - const url = new URL(origin); + const url2 = new URL(origin); if (netConnect === true) { return true; - } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) { + } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url2.host))) { return true; } return false; @@ -12001,16 +12001,16 @@ var require_response = __commonJS({ return responseObject; } // Creates a redirect Response that redirects to url with status status. - static redirect(url, status = 302) { + static redirect(url2, status = 302) { const relevantRealm = { settingsObject: {} }; webidl.argumentLengthCheck(arguments, 1, { header: "Response.redirect" }); - url = webidl.converters.USVString(url); + url2 = webidl.converters.USVString(url2); status = webidl.converters["unsigned short"](status); let parsedURL; try { - parsedURL = new URL(url, getGlobalOrigin()); + parsedURL = new URL(url2, getGlobalOrigin()); } catch (err) { - throw Object.assign(new TypeError("Failed to parse URL from " + url), { + throw Object.assign(new TypeError("Failed to parse URL from " + url2), { cause: err }); } @@ -12054,11 +12054,11 @@ var require_response = __commonJS({ get url() { webidl.brandCheck(this, _Response); const urlList = this[kState].urlList; - const url = urlList[urlList.length - 1] ?? null; - if (url === null) { + const url2 = urlList[urlList.length - 1] ?? null; + if (url2 === null) { return ""; } - return URLSerializer(url, true); + return URLSerializer(url2, true); } // Returns whether response was obtained through a redirect. get redirected() { @@ -13850,12 +13850,12 @@ var require_fetch = __commonJS({ } return response; async function dispatch({ body }) { - const url = requestCurrentURL(request); + const url2 = requestCurrentURL(request); const agent = fetchParams.controller.dispatcher; return new Promise((resolve8, reject) => agent.dispatch( { - path: url.pathname + url.search, - origin: url.origin, + path: url2.pathname + url2.search, + origin: url2.origin, method: request.method, body: fetchParams.controller.dispatcher.isMockActive ? request.body && (request.body.source || request.body.stream) : body, headers: request.headersList.entries, @@ -16335,9 +16335,9 @@ var require_connection = __commonJS({ crypto = require("crypto"); } catch { } - function establishWebSocketConnection(url, protocols, ws, onEstablish, options) { - const requestURL = url; - requestURL.protocol = url.protocol === "ws:" ? "http:" : "https:"; + function establishWebSocketConnection(url2, protocols, ws, onEstablish, options) { + const requestURL = url2; + requestURL.protocol = url2.protocol === "ws:" ? "http:" : "https:"; const request = makeRequest({ urlList: [requestURL], serviceWorkers: "none", @@ -16788,7 +16788,7 @@ var require_websocket = __commonJS({ * @param {string} url * @param {string|string[]} protocols */ - constructor(url, protocols = []) { + constructor(url2, protocols = []) { super(); webidl.argumentLengthCheck(arguments, 1, { header: "WebSocket constructor" }); if (!experimentalWarned) { @@ -16798,12 +16798,12 @@ var require_websocket = __commonJS({ }); } const options = webidl.converters["DOMString or sequence or WebSocketInit"](protocols); - url = webidl.converters.USVString(url); + url2 = webidl.converters.USVString(url2); protocols = options.protocols; const baseURL = getGlobalOrigin(); let urlRecord; try { - urlRecord = new URL(url, baseURL); + urlRecord = new URL(url2, baseURL); } catch (e) { throw new DOMException2(e, "SyntaxError"); } @@ -17198,12 +17198,12 @@ var require_undici = __commonJS({ module2.exports.buildConnector = buildConnector; module2.exports.errors = errors; function makeDispatcher(fn) { - return (url, opts, handler) => { + return (url2, opts, handler) => { if (typeof opts === "function") { handler = opts; opts = null; } - if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) { + if (!url2 || typeof url2 !== "string" && typeof url2 !== "object" && !(url2 instanceof URL)) { throw new InvalidArgumentError("invalid url"); } if (opts != null && typeof opts !== "object") { @@ -17217,12 +17217,12 @@ var require_undici = __commonJS({ if (!opts.path.startsWith("/")) { path15 = `/${path15}`; } - url = new URL(util.parseOrigin(url).origin + path15); + url2 = new URL(util.parseOrigin(url2).origin + path15); } else { if (!opts) { - opts = typeof url === "object" ? url : {}; + opts = typeof url2 === "object" ? url2 : {}; } - url = util.parseURL(url); + url2 = util.parseURL(url2); } const { agent, dispatcher = getGlobalDispatcher() } = opts; if (agent) { @@ -17230,8 +17230,8 @@ var require_undici = __commonJS({ } return fn.call(dispatcher, { ...opts, - origin: url.origin, - path: url.search ? `${url.pathname}${url.search}` : url.pathname, + origin: url2.origin, + path: url2.search ? `${url2.pathname}${url2.search}` : url2.pathname, method: opts.method || (opts.body ? "PUT" : "GET") }, handler); }; @@ -19957,8 +19957,8 @@ var require_utils3 = __commonJS({ exports2.getProxyAgentDispatcher = getProxyAgentDispatcher; function getProxyFetch(destinationUrl) { const httpDispatcher = getProxyAgentDispatcher(destinationUrl); - const proxyFetch = (url, opts) => __awaiter4(this, void 0, void 0, function* () { - return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); + const proxyFetch = (url2, opts) => __awaiter4(this, void 0, void 0, function* () { + return (0, undici_1.fetch)(url2, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); }); return proxyFetch; } @@ -20215,8 +20215,8 @@ var require_dist_node2 = __commonJS({ } function merge2(defaults, route, options) { if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { method, url } : { url: method }, options); + let [method, url2] = route.split(" "); + options = Object.assign(url2 ? { method, url: url2 } : { url: method }, options); } else { options = Object.assign({}, route); } @@ -20234,13 +20234,13 @@ var require_dist_node2 = __commonJS({ } return mergedOptions; } - function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; + function addQueryParameters(url2, parameters) { + const separator = /\?/.test(url2) ? "&" : "?"; const names = Object.keys(parameters); if (names.length === 0) { - return url; + return url2; } - return url + separator + names.map((name) => { + return url2 + separator + names.map((name) => { if (name === "q") { return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); } @@ -20251,8 +20251,8 @@ var require_dist_node2 = __commonJS({ function removeNonChars(variableName) { return variableName.replace(/(?:^\W+)|(?:(? urlVariableNames.includes(option)).concat("baseUrl"); const remainingParameters = omit(parameters, omittedParameters); @@ -20427,7 +20427,7 @@ var require_dist_node2 = __commonJS({ ) ).join(","); } - if (url.endsWith("/graphql")) { + if (url2.endsWith("/graphql")) { if (options.mediaType.previews?.length) { const previewsFromAcceptHeader = headers.accept.match(/(? { @@ -20438,7 +20438,7 @@ var require_dist_node2 = __commonJS({ } } if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); + url2 = addQueryParameters(url2, remainingParameters); } else { if ("data" in remainingParameters) { body = remainingParameters.data; @@ -20455,7 +20455,7 @@ var require_dist_node2 = __commonJS({ body = ""; } return Object.assign( - { method, url, headers }, + { method, url: url2, headers }, typeof body !== "undefined" ? { body } : null, options.request ? { request: options.request } : null ); @@ -20714,7 +20714,7 @@ var require_dist_node5 = __commonJS({ } let headers = {}; let status; - let url; + let url2; let { fetch } = globalThis; if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { fetch = requestOptions.request.fetch; @@ -20734,7 +20734,7 @@ var require_dist_node5 = __commonJS({ // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. ...requestOptions.body && { duplex: "half" } }).then(async (response) => { - url = response.url; + url2 = response.url; status = response.status; for (const keyAndValue of response.headers) { headers[keyAndValue[0]] = keyAndValue[1]; @@ -20755,7 +20755,7 @@ var require_dist_node5 = __commonJS({ } throw new import_request_error.RequestError(response.statusText, status, { response: { - url, + url: url2, status, headers, data: void 0 @@ -20766,7 +20766,7 @@ var require_dist_node5 = __commonJS({ if (status === 304) { throw new import_request_error.RequestError("Not modified", status, { response: { - url, + url: url2, status, headers, data: await getResponseData(response) @@ -20778,7 +20778,7 @@ var require_dist_node5 = __commonJS({ const data = await getResponseData(response); const error2 = new import_request_error.RequestError(toErrorMessage(data), status, { response: { - url, + url: url2, status, headers, data @@ -20791,7 +20791,7 @@ var require_dist_node5 = __commonJS({ }).then((data) => { return { status, - url, + url: url2, headers, data }; @@ -20955,8 +20955,8 @@ var require_dist_node6 = __commonJS({ } function merge2(defaults, route, options) { if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { method, url } : { url: method }, options); + let [method, url2] = route.split(" "); + options = Object.assign(url2 ? { method, url: url2 } : { url: method }, options); } else { options = Object.assign({}, route); } @@ -20974,13 +20974,13 @@ var require_dist_node6 = __commonJS({ } return mergedOptions; } - function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; + function addQueryParameters(url2, parameters) { + const separator = /\?/.test(url2) ? "&" : "?"; const names = Object.keys(parameters); if (names.length === 0) { - return url; + return url2; } - return url + separator + names.map((name) => { + return url2 + separator + names.map((name) => { if (name === "q") { return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); } @@ -20991,8 +20991,8 @@ var require_dist_node6 = __commonJS({ function removeNonChars(variableName) { return variableName.replace(/(?:^\W+)|(?:(? urlVariableNames.includes(option)).concat("baseUrl"); const remainingParameters = omit(parameters, omittedParameters); @@ -21167,7 +21167,7 @@ var require_dist_node6 = __commonJS({ ) ).join(","); } - if (url.endsWith("/graphql")) { + if (url2.endsWith("/graphql")) { if (options.mediaType.previews?.length) { const previewsFromAcceptHeader = headers.accept.match(/(? { @@ -21178,7 +21178,7 @@ var require_dist_node6 = __commonJS({ } } if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); + url2 = addQueryParameters(url2, remainingParameters); } else { if ("data" in remainingParameters) { body = remainingParameters.data; @@ -21195,7 +21195,7 @@ var require_dist_node6 = __commonJS({ body = ""; } return Object.assign( - { method, url, headers }, + { method, url: url2, headers }, typeof body !== "undefined" ? { body } : null, options.request ? { request: options.request } : null ); @@ -21362,7 +21362,7 @@ var require_dist_node8 = __commonJS({ } let headers = {}; let status; - let url; + let url2; let { fetch } = globalThis; if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { fetch = requestOptions.request.fetch; @@ -21382,7 +21382,7 @@ var require_dist_node8 = __commonJS({ // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. ...requestOptions.body && { duplex: "half" } }).then(async (response) => { - url = response.url; + url2 = response.url; status = response.status; for (const keyAndValue of response.headers) { headers[keyAndValue[0]] = keyAndValue[1]; @@ -21403,7 +21403,7 @@ var require_dist_node8 = __commonJS({ } throw new import_request_error.RequestError(response.statusText, status, { response: { - url, + url: url2, status, headers, data: void 0 @@ -21414,7 +21414,7 @@ var require_dist_node8 = __commonJS({ if (status === 304) { throw new import_request_error.RequestError("Not modified", status, { response: { - url, + url: url2, status, headers, data: await getResponseData(response) @@ -21426,7 +21426,7 @@ var require_dist_node8 = __commonJS({ const data = await getResponseData(response); const error2 = new import_request_error.RequestError(toErrorMessage(data), status, { response: { - url, + url: url2, status, headers, data @@ -21439,7 +21439,7 @@ var require_dist_node8 = __commonJS({ }).then((data) => { return { status, - url, + url: url2, headers, data }; @@ -23907,11 +23907,11 @@ var require_dist_node12 = __commonJS({ for (const [scope, endpoints] of Object.entries(endpoints_default)) { for (const [methodName, endpoint] of Object.entries(endpoints)) { const [route, defaults, decorations] = endpoint; - const [method, url] = route.split(/ /); + const [method, url2] = route.split(/ /); const endpointDefaults = Object.assign( { method, - url + url: url2 }, defaults ); @@ -24105,23 +24105,23 @@ var require_dist_node13 = __commonJS({ const requestMethod = typeof route === "function" ? route : octokit.request; const method = options.method; const headers = options.headers; - let url = options.url; + let url2 = options.url; return { [Symbol.asyncIterator]: () => ({ async next() { - if (!url) + if (!url2) return { done: true }; try { - const response = await requestMethod({ method, url, headers }); + const response = await requestMethod({ method, url: url2, headers }); const normalizedResponse = normalizePaginatedListResponse(response); - url = ((normalizedResponse.headers.link || "").match( + url2 = ((normalizedResponse.headers.link || "").match( /<([^<>]+)>;\s*rel="next"/ ) || [])[1]; return { value: normalizedResponse }; } catch (error2) { if (error2.status !== 409) throw error2; - url = ""; + url2 = ""; return { value: { status: 200, @@ -36289,7 +36289,6 @@ var require_package = __commonJS({ "console-log-level": "^1.4.1", del: "^6.1.1", "fast-deep-equal": "^3.1.3", - "file-url": "^3.0.0", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", @@ -41100,16 +41099,16 @@ var require_sanitizer = __commonJS({ if (typeof value !== "string" || value === null || value === "") { return value; } - const url = new URL(value); - if (!url.search) { + const url2 = new URL(value); + if (!url2.search) { return value; } - for (const [key] of url.searchParams) { + for (const [key] of url2.searchParams) { if (!this.allowedQueryParameters.has(key.toLowerCase())) { - url.searchParams.set(key, RedactedString); + url2.searchParams.set(key, RedactedString); } } - return url.toString(); + return url2.toString(); } sanitizeHeaders(obj) { const sanitized = {}; @@ -41198,8 +41197,8 @@ var require_redirectPolicy = __commonJS({ const { request, status, headers } = response; const locationHeader = headers.get("location"); if (locationHeader && (status === 300 || status === 301 && allowedRedirect.includes(request.method) || status === 302 && allowedRedirect.includes(request.method) || status === 303 && request.method === "POST" || status === 307) && currentRetries < maxRetries) { - const url = new URL(locationHeader, request.url); - request.url = url.toString(); + const url2 = new URL(locationHeader, request.url); + request.url = url2.toString(); if (status === 303) { request.method = "GET"; request.headers.delete("Content-Length"); @@ -43403,9 +43402,9 @@ var require_helpers2 = __commonJS({ } } exports2.json = json2; - function req(url, opts = {}) { - const href = typeof url === "string" ? url : url.href; - const req2 = (href.startsWith("https:") ? https2 : http).request(url, opts); + function req(url2, opts = {}) { + const href = typeof url2 === "string" ? url2 : url2.href; + const req2 = (href.startsWith("https:") ? https2 : http).request(url2, opts); const promise = new Promise((resolve8, reject) => { req2.once("response", resolve8).once("error", reject).end(); }); @@ -43885,11 +43884,11 @@ var require_dist4 = __commonJS({ const protocol = opts.secureEndpoint ? "https:" : "http:"; const hostname = req.getHeader("host") || "localhost"; const base = `${protocol}//${hostname}`; - const url = new url_1.URL(req.path, base); + const url2 = new url_1.URL(req.path, base); if (opts.port !== 80) { - url.port = String(opts.port); + url2.port = String(opts.port); } - req.path = String(url); + req.path = String(url2); const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders }; if (proxy.username || proxy.password) { const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; @@ -44060,8 +44059,8 @@ var require_proxyPolicy = __commonJS({ if (request.agent) { return; } - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; + const url2 = new URL(request.url); + const isInsecure = url2.protocol !== "https:"; if (request.tlsSettings) { log_js_1.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored."); } @@ -44708,17 +44707,17 @@ var require_nodeHttpClient = __commonJS({ } makeRequest(request, abortController, body) { var _a; - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; + const url2 = new URL(request.url); + const isInsecure = url2.protocol !== "https:"; if (isInsecure && !request.allowInsecureConnection) { throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); } const agent = (_a = request.agent) !== null && _a !== void 0 ? _a : this.getOrCreateAgent(request, isInsecure); const options = { agent, - hostname: url.hostname, - path: `${url.pathname}${url.search}`, - port: url.port, + hostname: url2.hostname, + path: `${url2.pathname}${url2.search}`, + port: url2.port, method: request.method, headers: request.headers.toJSON({ preserveCase: true }) }; @@ -48097,14 +48096,14 @@ var require_urlHelpers = __commonJS({ } return result; } - function isAbsoluteUrl(url) { - return url.includes("://"); + function isAbsoluteUrl(url2) { + return url2.includes("://"); } - function appendPath(url, pathToAppend) { + function appendPath(url2, pathToAppend) { if (!pathToAppend) { - return url; + return url2; } - const parsedUrl = new URL(url); + const parsedUrl = new URL(url2); let newPath = parsedUrl.pathname; if (!newPath.endsWith("/")) { newPath = `${newPath}/`; @@ -48195,11 +48194,11 @@ var require_urlHelpers = __commonJS({ } return result; } - function appendQueryParams(url, queryParams, sequenceParams, noOverwrite = false) { + function appendQueryParams(url2, queryParams, sequenceParams, noOverwrite = false) { if (queryParams.size === 0) { - return url; + return url2; } - const parsedUrl = new URL(url); + const parsedUrl = new URL(url2); const combinedParams = simpleParseQueryParams(parsedUrl.search); for (const [name, value] of queryParams) { const existingValue = combinedParams.get(name); @@ -48310,9 +48309,9 @@ var require_serviceClient = __commonJS({ if (!endpoint) { throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use."); } - const url = (0, urlHelpers_js_1.getRequestUrl)(endpoint, operationSpec, operationArguments, this); + const url2 = (0, urlHelpers_js_1.getRequestUrl)(endpoint, operationSpec, operationArguments, this); const request = (0, core_rest_pipeline_1.createPipelineRequest)({ - url + url: url2 }); request.method = operationSpec.httpMethod; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); @@ -52263,8 +52262,8 @@ var require_dist7 = __commonJS({ "11103", "11104" ]; - function escapeURLPath(url2) { - const urlParsed = new URL(url2); + function escapeURLPath(url3) { + const urlParsed = new URL(url3); let path15 = urlParsed.pathname; path15 = path15 || "/"; path15 = escape(path15); @@ -52351,15 +52350,15 @@ var require_dist7 = __commonJS({ function escape(text) { return encodeURIComponent(text).replace(/%2F/g, "/").replace(/'/g, "%27").replace(/\+/g, "%20").replace(/%25/g, "%"); } - function appendToURLPath(url2, name) { - const urlParsed = new URL(url2); + function appendToURLPath(url3, name) { + const urlParsed = new URL(url3); let path15 = urlParsed.pathname; path15 = path15 ? path15.endsWith("/") ? `${path15}${name}` : `${path15}/${name}` : name; urlParsed.pathname = path15; return urlParsed.toString(); } - function setURLParameter(url2, name, value) { - const urlParsed = new URL(url2); + function setURLParameter(url3, name, value) { + const urlParsed = new URL(url3); const encodedName = encodeURIComponent(name); const encodedValue = value ? encodeURIComponent(value) : void 0; const searchString = urlParsed.search === "" ? "?" : urlParsed.search; @@ -52378,34 +52377,34 @@ var require_dist7 = __commonJS({ urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return urlParsed.toString(); } - function getURLParameter(url2, name) { + function getURLParameter(url3, name) { var _a; - const urlParsed = new URL(url2); + const urlParsed = new URL(url3); return (_a = urlParsed.searchParams.get(name)) !== null && _a !== void 0 ? _a : void 0; } - function setURLHost(url2, host) { - const urlParsed = new URL(url2); + function setURLHost(url3, host) { + const urlParsed = new URL(url3); urlParsed.hostname = host; return urlParsed.toString(); } - function getURLPath(url2) { + function getURLPath(url3) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url3); return urlParsed.pathname; } catch (e) { return void 0; } } - function getURLScheme(url2) { + function getURLScheme(url3) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url3); return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; } catch (e) { return void 0; } } - function getURLPathAndQuery(url2) { - const urlParsed = new URL(url2); + function getURLPathAndQuery(url3) { + const urlParsed = new URL(url3); const pathString = urlParsed.pathname; if (!pathString) { throw new RangeError("Invalid url without valid path."); @@ -52417,8 +52416,8 @@ var require_dist7 = __commonJS({ } return `${pathString}${queryString}`; } - function getURLQueries(url2) { - let queryString = new URL(url2).search; + function getURLQueries(url3) { + let queryString = new URL(url3).search; if (!queryString) { return {}; } @@ -52439,8 +52438,8 @@ var require_dist7 = __commonJS({ } return queries; } - function appendToURLQuery(url2, queryParts) { - const urlParsed = new URL(url2); + function appendToURLQuery(url3, queryParts) { + const urlParsed = new URL(url3); let query = urlParsed.search; if (query) { query += "&" + queryParts; @@ -52506,8 +52505,8 @@ var require_dist7 = __commonJS({ function iEqual(str1, str2) { return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } - function getAccountNameFromUrl(url2) { - const parsedUrl = new URL(url2); + function getAccountNameFromUrl(url3) { + const parsedUrl = new URL(url3); let accountName; try { if (parsedUrl.hostname.split(".")[1] === "blob") { @@ -62445,7 +62444,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var url = { + var url2 = { parameterPath: "url", mapper: { serializedName: "url", @@ -64121,7 +64120,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp, timeoutInSeconds ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -64151,7 +64150,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp, timeoutInSeconds ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64178,7 +64177,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, comp1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64208,7 +64207,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; maxPageSize, include ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64236,7 +64235,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, comp3 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -64265,7 +64264,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, restype1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64292,7 +64291,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body, queryParameters: [timeoutInSeconds, comp4], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ accept, version, @@ -64325,7 +64324,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp5, where ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64513,7 +64512,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64539,7 +64538,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64562,7 +64561,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64591,7 +64590,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp6 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64632,7 +64631,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp7 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64660,7 +64659,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp7 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -64693,7 +64692,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp8 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64721,7 +64720,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp9 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64754,7 +64753,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp4, restype2 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ accept, version, @@ -64788,7 +64787,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; where, restype2 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64814,7 +64813,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64845,7 +64844,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64875,7 +64874,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64905,7 +64904,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64935,7 +64934,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64971,7 +64970,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, include1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65003,7 +65002,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; include1, delimiter ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65029,7 +65028,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, restype1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65293,7 +65292,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, versionId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65331,7 +65330,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, versionId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65367,7 +65366,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, blobDeleteType ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65396,7 +65395,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp8], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65418,7 +65417,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp11], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65442,7 +65441,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65476,7 +65475,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65501,7 +65500,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65523,7 +65522,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp13], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65546,7 +65545,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp6], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65579,7 +65578,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65609,7 +65608,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65638,7 +65637,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65667,7 +65666,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65697,7 +65696,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65726,7 +65725,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp14], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65759,7 +65758,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65801,7 +65800,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65849,7 +65848,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp15, copyId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65881,7 +65880,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, comp16 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65911,7 +65910,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, restype1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65949,7 +65948,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, comp17 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -65989,7 +65988,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, comp18 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66018,7 +66017,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, comp18 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -66152,7 +66151,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66201,7 +66200,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body1, queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66244,7 +66243,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66282,7 +66281,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66336,7 +66335,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, comp20 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66373,7 +66372,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp20, prevsnapshot ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66403,7 +66402,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66436,7 +66435,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66466,7 +66465,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp21], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66547,7 +66546,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66593,7 +66592,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body1, queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66633,7 +66632,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66678,7 +66677,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp23], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66798,7 +66797,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body1, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66849,7 +66848,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66908,7 +66907,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp24, blockId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66945,7 +66944,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp24, blockId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66983,7 +66982,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: blocks, queryParameters: [timeoutInSeconds, comp25], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -67038,7 +67037,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp25, listType ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67056,9 +67055,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * operation. * @param options The parameter options */ - constructor(url2, options) { + constructor(url3, options) { var _a, _b; - if (url2 === void 0) { + if (url3 === void 0) { throw new Error("'url' cannot be null"); } if (!options) { @@ -67073,7 +67072,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; userAgentPrefix }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{url}" }); super(optionsWithDefaults); - this.url = url2; + this.url = url3; this.version = options.version || "2024-11-04"; this.service = new ServiceImpl(this); this.container = new ContainerImpl(this); @@ -67098,9 +67097,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param url - url to resource * @param pipeline - request policy pipeline. */ - constructor(url2, pipeline) { - this.url = escapeURLPath(url2); - this.accountName = getAccountNameFromUrl(url2); + constructor(url3, pipeline) { + this.url = escapeURLPath(url3); + this.accountName = getAccountNameFromUrl(url3); this.pipeline = pipeline; this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline)); this.isHttps = iEqual(getURLScheme(this.url) || "", "https"); @@ -70358,16 +70357,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { options = options || {}; let pipeline; - let url2; + let url3; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } @@ -70379,7 +70378,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -70388,7 +70387,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -70396,7 +70395,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); ({ blobName: this._name, containerName: this._containerName } = this.getBlobAndContainerNamesFromUrl()); this.blobContext = this.storageClientContext.blob; this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT); @@ -71244,17 +71243,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; var AppendBlobClient = class _AppendBlobClient extends BlobClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(new AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; @@ -71263,7 +71262,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -71272,7 +71271,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -71280,7 +71279,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); this.appendBlobContext = this.storageClientContext.appendBlob; } /** @@ -71459,17 +71458,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; var BlockBlobClient = class _BlockBlobClient extends BlobClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } @@ -71481,7 +71480,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -71490,7 +71489,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -71498,7 +71497,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); this.blockBlobContext = this.storageClientContext.blockBlob; this._blobContext = this.storageClientContext.blob; } @@ -72006,17 +72005,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; var PageBlobClient = class _PageBlobClient extends BlobClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(new AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; @@ -72025,7 +72024,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -72034,7 +72033,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -72042,7 +72041,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); this.pageBlobContext = this.storageClientContext.pageBlob; } /** @@ -72913,13 +72912,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { - let url2; + let url3; let credential; if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrOptions instanceof StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrOptions))) { - url2 = urlOrBlobClient; + url3 = urlOrBlobClient; credential = credentialOrOptions; } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + url3 = urlOrBlobClient.url; credential = urlOrBlobClient.credential; options = credentialOrOptions; } else { @@ -72931,23 +72930,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("delete"); await this.addSubRequestInternal({ - url: url2, + url: url3, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).delete(updatedOptions); + await new BlobClient(url3, this.batchRequest.createPipeline(credential)).delete(updatedOptions); }); }); } async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { - let url2; + let url3; let credential; let tier2; if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrTier instanceof StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrTier))) { - url2 = urlOrBlobClient; + url3 = urlOrBlobClient; credential = credentialOrTier; tier2 = tierOrOptions; } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + url3 = urlOrBlobClient.url; credential = urlOrBlobClient.credential; tier2 = credentialOrTier; options = tierOrOptions; @@ -72960,10 +72959,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("setAccessTier"); await this.addSubRequestInternal({ - url: url2, + url: url3, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); + await new BlobClient(url3, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); }); }); } @@ -73086,7 +73085,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } var BlobBatchClient = class { - constructor(url2, credentialOrPipeline, options) { + constructor(url3, credentialOrPipeline, options) { let pipeline; if (isPipelineLike(credentialOrPipeline)) { pipeline = credentialOrPipeline; @@ -73095,8 +73094,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { pipeline = newPipeline(credentialOrPipeline, options); } - const storageClientContext = new StorageContextClient(url2, getCoreClientOptions(pipeline)); - const path15 = getURLPath(url2); + const storageClientContext = new StorageContextClient(url3, getCoreClientOptions(pipeline)); + const path15 = getURLPath(url3); if (path15 && path15 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { @@ -73200,16 +73199,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(new AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string") { const containerName = credentialOrPipelineOrContainerName; @@ -73217,7 +73216,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); + url3 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -73226,7 +73225,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -73234,7 +73233,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName parameter"); } - super(url2, pipeline); + super(url3, pipeline); this._containerName = this.getContainerNameFromUrl(); this.containerContext = this.storageClientContext.container; } @@ -74683,7 +74682,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } - constructor(url2, credentialOrPipeline, options) { + constructor(url3, credentialOrPipeline, options) { let pipeline; if (isPipelineLike(credentialOrPipeline)) { pipeline = credentialOrPipeline; @@ -74692,7 +74691,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { pipeline = newPipeline(new AnonymousCredential(), options); } - super(url2, pipeline); + super(url3, pipeline); this.serviceContext = this.storageClientContext.service; } /** @@ -76454,9 +76453,9 @@ var require_cacheHttpClient = __commonJS({ if (!baseUrl) { throw new Error("Cache Service Url not found, unable to restore cache."); } - const url = `${baseUrl}_apis/artifactcache/${resource}`; - core18.debug(`Resource Url: ${url}`); - return url; + const url2 = `${baseUrl}_apis/artifactcache/${resource}`; + core18.debug(`Resource Url: ${url2}`); + return url2; } function createAcceptHeader(type2, apiVersion) { return `${type2};api-version=${apiVersion}`; @@ -81550,18 +81549,18 @@ var require_util10 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.maskSecretUrls = exports2.maskSigUrl = void 0; var core_1 = require_core(); - function maskSigUrl(url) { - if (!url) + function maskSigUrl(url2) { + if (!url2) return; try { - const parsedUrl = new URL(url); + const parsedUrl = new URL(url2); const signature = parsedUrl.searchParams.get("sig"); if (signature) { (0, core_1.setSecret)(signature); (0, core_1.setSecret)(encodeURIComponent(signature)); } } catch (error2) { - (0, core_1.debug)(`Failed to parse URL: ${url} ${error2 instanceof Error ? error2.message : String(error2)}`); + (0, core_1.debug)(`Failed to parse URL: ${url2} ${error2 instanceof Error ? error2.message : String(error2)}`); } } exports2.maskSigUrl = maskSigUrl; @@ -81647,14 +81646,14 @@ var require_cacheTwirpClient = __commonJS({ // JSON generated client. request(service, method, contentType, data) { return __awaiter4(this, void 0, void 0, function* () { - const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; - (0, core_1.debug)(`[Request] ${method} ${url}`); + const url2 = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; + (0, core_1.debug)(`[Request] ${method} ${url2}`); const headers = { "Content-Type": contentType }; try { const { body } = yield this.retryableRequest(() => __awaiter4(this, void 0, void 0, function* () { - return this.httpClient.post(url, JSON.stringify(data), headers); + return this.httpClient.post(url2, JSON.stringify(data), headers); })); return body; } catch (error2) { @@ -82747,18 +82746,18 @@ var require_tool_cache = __commonJS({ var IS_WINDOWS = process.platform === "win32"; var IS_MAC = process.platform === "darwin"; var userAgent = "actions/tool-cache"; - function downloadTool2(url, dest, auth, headers) { + function downloadTool2(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { dest = dest || path15.join(_getTempDirectory(), crypto.randomUUID()); yield io7.mkdirP(path15.dirname(dest)); - core18.debug(`Downloading ${url}`); + core18.debug(`Downloading ${url2}`); core18.debug(`Destination ${dest}`); const maxAttempts = 3; const minSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS", 10); const maxSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS", 20); const retryHelper = new retry_helper_1.RetryHelper(maxAttempts, minSeconds, maxSeconds); return yield retryHelper.execute(() => __awaiter4(this, void 0, void 0, function* () { - return yield downloadToolAttempt(url, dest || "", auth, headers); + return yield downloadToolAttempt(url2, dest || "", auth, headers); }), (err) => { if (err instanceof HTTPError && err.httpStatusCode) { if (err.httpStatusCode < 500 && err.httpStatusCode !== 408 && err.httpStatusCode !== 429) { @@ -82770,7 +82769,7 @@ var require_tool_cache = __commonJS({ }); } exports2.downloadTool = downloadTool2; - function downloadToolAttempt(url, dest, auth, headers) { + function downloadToolAttempt(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { if (fs17.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); @@ -82785,10 +82784,10 @@ var require_tool_cache = __commonJS({ } headers.authorization = auth; } - const response = yield http.get(url, headers); + const response = yield http.get(url2, headers); if (response.message.statusCode !== 200) { const err = new HTTPError(response.message.statusCode); - core18.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); + core18.debug(`Failed to download from "${url2}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); throw err; } const pipeline = util.promisify(stream2.pipeline); @@ -83264,8 +83263,8 @@ var require_debug2 = __commonJS({ // node_modules/follow-redirects/index.js var require_follow_redirects = __commonJS({ "node_modules/follow-redirects/index.js"(exports2, module2) { - var url = require("url"); - var URL2 = url.URL; + var url2 = require("url"); + var URL2 = url2.URL; var http = require("http"); var https2 = require("https"); var Writable = require("stream").Writable; @@ -83517,7 +83516,7 @@ var require_follow_redirects = __commonJS({ for (var event of events) { request.on(event, eventHandlers[event]); } - this._currentUrl = /^\//.test(this._options.path) ? url.format(this._options) : ( + this._currentUrl = /^\//.test(this._options.path) ? url2.format(this._options) : ( // When making a request to a proxy, […] // a client MUST send the target URI in absolute-form […]. this._options.path @@ -83585,7 +83584,7 @@ var require_follow_redirects = __commonJS({ var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); var currentUrlParts = parseUrl(this._currentUrl); var currentHost = currentHostHeader || currentUrlParts.host; - var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url.format(Object.assign(currentUrlParts, { host: currentHost })); + var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url2.format(Object.assign(currentUrlParts, { host: currentHost })); var redirectUrl = resolveUrl(location, currentUrl); debug3("redirecting to", redirectUrl.href); this._isRedirect = true; @@ -83663,7 +83662,7 @@ var require_follow_redirects = __commonJS({ if (useNativeURL) { parsed = new URL2(input); } else { - parsed = validateUrl(url.parse(input)); + parsed = validateUrl(url2.parse(input)); if (!isString(parsed.protocol)) { throw new InvalidUrlError({ input }); } @@ -83671,7 +83670,7 @@ var require_follow_redirects = __commonJS({ return parsed; } function resolveUrl(relative2, base) { - return useNativeURL ? new URL2(relative2, base) : parseUrl(url.resolve(base, relative2)); + return useNativeURL ? new URL2(relative2, base) : parseUrl(url2.resolve(base, relative2)); } function validateUrl(input) { if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { @@ -86166,14 +86165,14 @@ var require_artifact_twirp_client2 = __commonJS({ // JSON generated client. request(service, method, contentType, data) { return __awaiter4(this, void 0, void 0, function* () { - const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; - (0, core_1.debug)(`[Request] ${method} ${url}`); + const url2 = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; + (0, core_1.debug)(`[Request] ${method} ${url2}`); const headers = { "Content-Type": contentType }; try { const { body } = yield this.retryableRequest(() => __awaiter4(this, void 0, void 0, function* () { - return this.httpClient.post(url, JSON.stringify(data), headers); + return this.httpClient.post(url2, JSON.stringify(data), headers); })); return body; } catch (error2) { @@ -111044,10 +111043,10 @@ var require_dist_node16 = __commonJS({ } function merge2(defaults, route, options) { if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { + let [method, url2] = route.split(" "); + options = Object.assign(url2 ? { method, - url + url: url2 } : { url: method }, options); @@ -111064,13 +111063,13 @@ var require_dist_node16 = __commonJS({ mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, "")); return mergedOptions; } - function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; + function addQueryParameters(url2, parameters) { + const separator = /\?/.test(url2) ? "&" : "?"; const names = Object.keys(parameters); if (names.length === 0) { - return url; + return url2; } - return url + separator + names.map((name) => { + return url2 + separator + names.map((name) => { if (name === "q") { return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); } @@ -111081,8 +111080,8 @@ var require_dist_node16 = __commonJS({ function removeNonChars(variableName) { return variableName.replace(/^\W+|\W+$/g, "").split(/,/); } - function extractUrlVariableNames(url) { - const matches = url.match(urlVariableRegex); + function extractUrlVariableNames(url2) { + const matches = url2.match(urlVariableRegex); if (!matches) { return []; } @@ -111214,14 +111213,14 @@ var require_dist_node16 = __commonJS({ } function parse(options) { let method = options.method.toUpperCase(); - let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let url2 = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); let headers = Object.assign({}, options.headers); let body; let parameters = omit(options, ["method", "baseUrl", "url", "headers", "request", "mediaType"]); - const urlVariableNames = extractUrlVariableNames(url); - url = parseUrl(url).expand(parameters); - if (!/^http/.test(url)) { - url = options.baseUrl + url; + const urlVariableNames = extractUrlVariableNames(url2); + url2 = parseUrl(url2).expand(parameters); + if (!/^http/.test(url2)) { + url2 = options.baseUrl + url2; } const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); const remainingParameters = omit(parameters, omittedParameters); @@ -111239,7 +111238,7 @@ var require_dist_node16 = __commonJS({ } } if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); + url2 = addQueryParameters(url2, remainingParameters); } else { if ("data" in remainingParameters) { body = remainingParameters.data; @@ -111259,7 +111258,7 @@ var require_dist_node16 = __commonJS({ } return Object.assign({ method, - url, + url: url2, headers }, typeof body !== "undefined" ? { body @@ -111701,8 +111700,8 @@ var require_url_state_machine = __commonJS({ function isSpecialScheme(scheme) { return specialSchemes[scheme] !== void 0; } - function isSpecial(url) { - return isSpecialScheme(url.scheme); + function isSpecial(url2) { + return isSpecialScheme(url2.scheme); } function defaultPort(scheme) { return specialSchemes[scheme]; @@ -112024,38 +112023,38 @@ var require_url_state_machine = __commonJS({ } return host; } - function trimControlChars(url) { - return url.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g, ""); + function trimControlChars(url2) { + return url2.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g, ""); } - function trimTabAndNewline(url) { - return url.replace(/\u0009|\u000A|\u000D/g, ""); + function trimTabAndNewline(url2) { + return url2.replace(/\u0009|\u000A|\u000D/g, ""); } - function shortenPath(url) { - const path15 = url.path; + function shortenPath(url2) { + const path15 = url2.path; if (path15.length === 0) { return; } - if (url.scheme === "file" && path15.length === 1 && isNormalizedWindowsDriveLetter(path15[0])) { + if (url2.scheme === "file" && path15.length === 1 && isNormalizedWindowsDriveLetter(path15[0])) { return; } path15.pop(); } - function includesCredentials(url) { - return url.username !== "" || url.password !== ""; + function includesCredentials(url2) { + return url2.username !== "" || url2.password !== ""; } - function cannotHaveAUsernamePasswordPort(url) { - return url.host === null || url.host === "" || url.cannotBeABaseURL || url.scheme === "file"; + function cannotHaveAUsernamePasswordPort(url2) { + return url2.host === null || url2.host === "" || url2.cannotBeABaseURL || url2.scheme === "file"; } function isNormalizedWindowsDriveLetter(string) { return /^[A-Za-z]:$/.test(string); } - function URLStateMachine(input, base, encodingOverride, url, stateOverride) { + function URLStateMachine(input, base, encodingOverride, url2, stateOverride) { this.pointer = 0; this.input = input; this.base = base || null; this.encodingOverride = encodingOverride || "utf-8"; this.stateOverride = stateOverride; - this.url = url; + this.url = url2; this.failure = false; this.parseError = false; if (!this.url) { @@ -112608,36 +112607,36 @@ var require_url_state_machine = __commonJS({ } return true; }; - function serializeURL(url, excludeFragment) { - let output = url.scheme + ":"; - if (url.host !== null) { + function serializeURL(url2, excludeFragment) { + let output = url2.scheme + ":"; + if (url2.host !== null) { output += "//"; - if (url.username !== "" || url.password !== "") { - output += url.username; - if (url.password !== "") { - output += ":" + url.password; + if (url2.username !== "" || url2.password !== "") { + output += url2.username; + if (url2.password !== "") { + output += ":" + url2.password; } output += "@"; } - output += serializeHost(url.host); - if (url.port !== null) { - output += ":" + url.port; + output += serializeHost(url2.host); + if (url2.port !== null) { + output += ":" + url2.port; } - } else if (url.host === null && url.scheme === "file") { + } else if (url2.host === null && url2.scheme === "file") { output += "//"; } - if (url.cannotBeABaseURL) { - output += url.path[0]; + if (url2.cannotBeABaseURL) { + output += url2.path[0]; } else { - for (const string of url.path) { + for (const string of url2.path) { output += "/" + string; } } - if (url.query !== null) { - output += "?" + url.query; + if (url2.query !== null) { + output += "?" + url2.query; } - if (!excludeFragment && url.fragment !== null) { - output += "#" + url.fragment; + if (!excludeFragment && url2.fragment !== null) { + output += "#" + url2.fragment; } return output; } @@ -112650,11 +112649,11 @@ var require_url_state_machine = __commonJS({ return result; } module2.exports.serializeURL = serializeURL; - module2.exports.serializeURLOrigin = function(url) { - switch (url.scheme) { + module2.exports.serializeURLOrigin = function(url2) { + switch (url2.scheme) { case "blob": try { - return module2.exports.serializeURLOrigin(module2.exports.parseURL(url.path[0])); + return module2.exports.serializeURLOrigin(module2.exports.parseURL(url2.path[0])); } catch (e) { return "null"; } @@ -112665,9 +112664,9 @@ var require_url_state_machine = __commonJS({ case "ws": case "wss": return serializeOrigin({ - scheme: url.scheme, - host: url.host, - port: url.port + scheme: url2.scheme, + host: url2.host, + port: url2.port }); case "file": return "file://"; @@ -112685,18 +112684,18 @@ var require_url_state_machine = __commonJS({ } return usm.url; }; - module2.exports.setTheUsername = function(url, username) { - url.username = ""; + module2.exports.setTheUsername = function(url2, username) { + url2.username = ""; const decoded = punycode.ucs2.decode(username); for (let i = 0; i < decoded.length; ++i) { - url.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode); + url2.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode); } }; - module2.exports.setThePassword = function(url, password) { - url.password = ""; + module2.exports.setThePassword = function(url2, password) { + url2.password = ""; const decoded = punycode.ucs2.decode(password); for (let i = 0; i < decoded.length; ++i) { - url.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode); + url2.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode); } }; module2.exports.serializeHost = serializeHost; @@ -112720,7 +112719,7 @@ var require_URL_impl = __commonJS({ var usm = require_url_state_machine(); exports2.implementation = class URLImpl { constructor(constructorArgs) { - const url = constructorArgs[0]; + const url2 = constructorArgs[0]; const base = constructorArgs[1]; let parsedBase = null; if (base !== void 0) { @@ -112729,7 +112728,7 @@ var require_URL_impl = __commonJS({ throw new TypeError("Invalid base URL"); } } - const parsedURL = usm.basicURLParse(url, { baseURL: parsedBase }); + const parsedURL = usm.basicURLParse(url2, { baseURL: parsedBase }); if (parsedURL === "failure") { throw new TypeError("Invalid URL"); } @@ -112773,14 +112772,14 @@ var require_URL_impl = __commonJS({ usm.setThePassword(this._url, v); } get host() { - const url = this._url; - if (url.host === null) { + const url2 = this._url; + if (url2.host === null) { return ""; } - if (url.port === null) { - return usm.serializeHost(url.host); + if (url2.port === null) { + return usm.serializeHost(url2.host); } - return usm.serializeHost(url.host) + ":" + usm.serializeInteger(url.port); + return usm.serializeHost(url2.host) + ":" + usm.serializeInteger(url2.port); } set host(v) { if (this._url.cannotBeABaseURL) { @@ -112839,14 +112838,14 @@ var require_URL_impl = __commonJS({ return "?" + this._url.query; } set search(v) { - const url = this._url; + const url2 = this._url; if (v === "") { - url.query = null; + url2.query = null; return; } const input = v[0] === "?" ? v.substring(1) : v; - url.query = ""; - usm.basicURLParse(input, { url, stateOverride: "query" }); + url2.query = ""; + usm.basicURLParse(input, { url: url2, stateOverride: "query" }); } get hash() { if (this._url.fragment === null || this._url.fragment === "") { @@ -112878,7 +112877,7 @@ var require_URL = __commonJS({ var utils = require_utils12(); var Impl = require_URL_impl(); var impl = utils.implSymbol; - function URL2(url) { + function URL2(url2) { if (!this || this[impl] || !(this instanceof URL2)) { throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function."); } @@ -114060,13 +114059,13 @@ var require_lib4 = __commonJS({ const dest = new URL$1(destination).hostname; return orig === dest || orig[orig.length - dest.length - 1] === "." && orig.endsWith(dest); }; - function fetch(url, opts) { + function fetch(url2, opts) { if (!fetch.Promise) { throw new Error("native promise missing, set fetch.Promise to your favorite alternative"); } Body.Promise = fetch.Promise; return new fetch.Promise(function(resolve8, reject) { - const request = new Request(url, opts); + const request = new Request(url2, opts); const options = getNodeRequestOptions(request); const send = (options.protocol === "https:" ? https2 : http).request; const signal = request.signal; @@ -114326,7 +114325,7 @@ var require_dist_node18 = __commonJS({ } let headers = {}; let status; - let url; + let url2; const fetch = requestOptions.request && requestOptions.request.fetch || nodeFetch; return fetch(requestOptions.url, Object.assign( { @@ -114339,7 +114338,7 @@ var require_dist_node18 = __commonJS({ // see https://github.com/octokit/types.ts/pull/264 requestOptions.request )).then(async (response) => { - url = response.url; + url2 = response.url; status = response.status; for (const keyAndValue of response.headers) { headers[keyAndValue[0]] = keyAndValue[1]; @@ -114358,7 +114357,7 @@ var require_dist_node18 = __commonJS({ } throw new requestError.RequestError(response.statusText, status, { response: { - url, + url: url2, status, headers, data: void 0 @@ -114369,7 +114368,7 @@ var require_dist_node18 = __commonJS({ if (status === 304) { throw new requestError.RequestError("Not modified", status, { response: { - url, + url: url2, status, headers, data: await getResponseData(response) @@ -114381,7 +114380,7 @@ var require_dist_node18 = __commonJS({ const data = await getResponseData(response); const error2 = new requestError.RequestError(toErrorMessage(data), status, { response: { - url, + url: url2, status, headers, data @@ -114394,7 +114393,7 @@ var require_dist_node18 = __commonJS({ }).then((data) => { return { status, - url, + url: url2, headers, data }; @@ -115743,10 +115742,10 @@ var require_dist_node22 = __commonJS({ for (const [scope, endpoints] of Object.entries(endpointsMap)) { for (const [methodName, endpoint] of Object.entries(endpoints)) { const [route, defaults, decorations] = endpoint; - const [method, url] = route.split(/ /); + const [method, url2] = route.split(/ /); const endpointDefaults = Object.assign({ method, - url + url: url2 }, defaults); if (!newMethods[scope]) { newMethods[scope] = {}; @@ -115886,27 +115885,27 @@ var require_dist_node23 = __commonJS({ const requestMethod = typeof route === "function" ? route : octokit.request; const method = options.method; const headers = options.headers; - let url = options.url; + let url2 = options.url; return { [Symbol.asyncIterator]: () => ({ async next() { - if (!url) return { + if (!url2) return { done: true }; try { const response = await requestMethod({ method, - url, + url: url2, headers }); const normalizedResponse = normalizePaginatedListResponse(response); - url = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1]; + url2 = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1]; return { value: normalizedResponse }; } catch (error2) { if (error2.status !== 409) throw error2; - url = ""; + url2 = ""; return { value: { status: 200, @@ -118014,8 +118013,8 @@ var require_download_artifact = __commonJS({ var generated_1 = require_generated(); var util_1 = require_util11(); var errors_1 = require_errors3(); - var scrubQueryParameters = (url) => { - const parsed = new URL(url); + var scrubQueryParameters = (url2) => { + const parsed = new URL(url2); parsed.search = ""; return parsed.toString(); }; @@ -118033,12 +118032,12 @@ var require_download_artifact = __commonJS({ } }); } - function streamExtract(url, directory) { + function streamExtract(url2, directory) { return __awaiter4(this, void 0, void 0, function* () { let retryCount = 0; while (retryCount < 5) { try { - return yield streamExtractExternal(url, directory); + return yield streamExtractExternal(url2, directory); } catch (error2) { retryCount++; core18.debug(`Failed to download artifact after ${retryCount} retries due to ${error2.message}. Retrying in 5 seconds...`); @@ -118048,10 +118047,10 @@ var require_download_artifact = __commonJS({ throw new Error(`Artifact download failed after ${retryCount} retries.`); }); } - function streamExtractExternal(url, directory) { + function streamExtractExternal(url2, directory) { return __awaiter4(this, void 0, void 0, function* () { const client = new httpClient.HttpClient((0, user_agent_1.getUserAgentString)()); - const response = yield client.get(url); + const response = yield client.get(url2); if (response.message.statusCode !== 200) { throw new Error(`Unexpected HTTP response from blob storage: ${response.message.statusCode} ${response.message.statusMessage}`); } @@ -122511,32 +122510,6 @@ var require_glob4 = __commonJS({ } }); -// node_modules/file-url/index.js -var require_file_url = __commonJS({ - "node_modules/file-url/index.js"(exports2, module2) { - "use strict"; - var path15 = require("path"); - module2.exports = (filePath, options) => { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - options = { - resolve: true, - ...options - }; - let pathName = filePath; - if (options.resolve) { - pathName = path15.resolve(filePath); - } - pathName = pathName.replace(/\\/g, "/"); - if (pathName[0] !== "/") { - pathName = `/${pathName}`; - } - return encodeURI(`file://${pathName}`).replace(/[?#]/g, encodeURIComponent); - }; - } -}); - // node_modules/jsonschema/lib/helpers.js var require_helpers3 = __commonJS({ "node_modules/jsonschema/lib/helpers.js"(exports2, module2) { @@ -129572,25 +129545,25 @@ function parseGitHubUrl(inputUrl) { if (!inputUrl.startsWith("http://") && !inputUrl.startsWith("https://")) { throw new ConfigurationError(`"${originalUrl}" is not a http or https URL`); } - let url; + let url2; try { - url = new URL(inputUrl); + url2 = new URL(inputUrl); } catch { throw new ConfigurationError(`"${originalUrl}" is not a valid URL`); } - if (url.hostname === "github.com" || url.hostname === "api.github.com") { + if (url2.hostname === "github.com" || url2.hostname === "api.github.com") { return GITHUB_DOTCOM_URL; } - if (url.pathname.indexOf("/api/v3") !== -1) { - url.pathname = url.pathname.substring(0, url.pathname.indexOf("/api/v3")); + if (url2.pathname.indexOf("/api/v3") !== -1) { + url2.pathname = url2.pathname.substring(0, url2.pathname.indexOf("/api/v3")); } - if (url.hostname.startsWith("api.")) { - url.hostname = url.hostname.substring(4); + if (url2.hostname.startsWith("api.")) { + url2.hostname = url2.hostname.substring(4); } - if (!url.pathname.endsWith("/")) { - url.pathname = `${url.pathname}/`; + if (!url2.pathname.endsWith("/")) { + url2.pathname = `${url2.pathname}/`; } - return url.toString(); + return url2.toString(); } var CODEQL_ACTION_WARNED_ABOUT_VERSION_ENV_VAR = "CODEQL_ACTION_WARNED_ABOUT_VERSION"; var hasBeenWarnedAboutVersion = false; @@ -131636,10 +131609,10 @@ function writeToolcacheMarkerFile(extractedPath, logger) { fs8.writeFileSync(markerFilePath, ""); logger.info(`Created toolcache marker file ${markerFilePath}`); } -function sanitizeUrlForStatusReport(url) { +function sanitizeUrlForStatusReport(url2) { return ["github/codeql-action", "dsp-testing/codeql-cli-nightlies"].some( - (repo) => url.startsWith(`https://github.com/${repo}/releases/download/`) - ) ? url : "sanitized-value"; + (repo) => url2.startsWith(`https://github.com/${repo}/releases/download/`) + ) ? url2 : "sanitized-value"; } // src/setup-codeql.ts @@ -131730,16 +131703,16 @@ function tryGetBundleVersionFromTagName(tagName, logger) { } return match[1]; } -function tryGetTagNameFromUrl(url, logger) { - const matches = [...url.matchAll(/\/(codeql-bundle-[^/]*)\//g)]; +function tryGetTagNameFromUrl(url2, logger) { + const matches = [...url2.matchAll(/\/(codeql-bundle-[^/]*)\//g)]; if (matches.length === 0) { - logger.debug(`Could not determine tag name for URL ${url}.`); + logger.debug(`Could not determine tag name for URL ${url2}.`); return void 0; } const match = matches[matches.length - 1]; if (match === null || match.length !== 2) { logger.debug( - `Could not determine tag name for URL ${url}. Matched ${JSON.stringify( + `Could not determine tag name for URL ${url2}. Matched ${JSON.stringify( match )}.` ); @@ -131815,13 +131788,13 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian } let cliVersion2; let tagName; - let url; + let url2; if (forceShippedTools) { cliVersion2 = cliVersion; tagName = bundleVersion; } else if (toolsInput !== void 0) { tagName = tryGetTagNameFromUrl(toolsInput, logger); - url = toolsInput; + url2 = toolsInput; if (tagName) { const bundleVersion3 = tryGetBundleVersionFromTagName(tagName, logger); if (bundleVersion3 && semver7.valid(bundleVersion3)) { @@ -131833,9 +131806,9 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian tagName = defaultCliVersion.tagName; } const bundleVersion2 = tagName && tryGetBundleVersionFromTagName(tagName, logger); - const humanReadableVersion = cliVersion2 ?? (bundleVersion2 && convertToSemVer(bundleVersion2, logger)) ?? tagName ?? url ?? "unknown"; + const humanReadableVersion = cliVersion2 ?? (bundleVersion2 && convertToSemVer(bundleVersion2, logger)) ?? tagName ?? url2 ?? "unknown"; logger.debug( - `Attempting to obtain CodeQL tools. CLI version: ${cliVersion2 ?? "unknown"}, bundle tag name: ${tagName ?? "unknown"}, URL: ${url ?? "unspecified"}.` + `Attempting to obtain CodeQL tools. CLI version: ${cliVersion2 ?? "unknown"}, bundle tag name: ${tagName ?? "unknown"}, URL: ${url2 ?? "unspecified"}.` ); let codeqlFolder; if (cliVersion2) { @@ -131917,32 +131890,32 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian } } let compressionMethod; - if (!url) { + if (!url2) { compressionMethod = cliVersion2 !== void 0 && await useZstdBundle(cliVersion2, tarSupportsZstd) ? "zstd" : "gzip"; - url = await getCodeQLBundleDownloadURL( + url2 = await getCodeQLBundleDownloadURL( tagName, apiDetails, compressionMethod, logger ); } else { - const method = inferCompressionMethod(url); + const method = inferCompressionMethod(url2); if (method === void 0) { throw new ConfigurationError( - `Could not infer compression method from URL ${url}. Please specify a URL ending in '.tar.gz' or '.tar.zst'.` + `Could not infer compression method from URL ${url2}. Please specify a URL ending in '.tar.gz' or '.tar.zst'.` ); } compressionMethod = method; } if (cliVersion2) { - logger.info(`Using CodeQL CLI version ${cliVersion2} sourced from ${url} .`); + logger.info(`Using CodeQL CLI version ${cliVersion2} sourced from ${url2} .`); } else { - logger.info(`Using CodeQL CLI sourced from ${url} .`); + logger.info(`Using CodeQL CLI sourced from ${url2} .`); } return { bundleVersion: tagName && tryGetBundleVersionFromTagName(tagName, logger), cliVersion: cliVersion2, - codeqlURL: url, + codeqlURL: url2, compressionMethod, sourceType: "download", toolsVersion: cliVersion2 ?? humanReadableVersion @@ -133161,9 +133134,9 @@ async function sendStatusReport(statusReport) { // src/upload-lib.ts var fs14 = __toESM(require("fs")); var path13 = __toESM(require("path")); +var url = __toESM(require("url")); var import_zlib = __toESM(require("zlib")); var core14 = __toESM(require_core()); -var import_file_url = __toESM(require_file_url()); var jsonschema = __toESM(require_lib5()); // src/fingerprints.ts @@ -134739,7 +134712,7 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features const sarifPayload = JSON.stringify(sarif); logger.debug(`Compressing serialized SARIF`); const zippedSarif = import_zlib.default.gzipSync(sarifPayload).toString("base64"); - const checkoutURI = (0, import_file_url.default)(checkoutPath); + const checkoutURI = url.pathToFileURL(checkoutPath).href; const payload = buildPayload( await getCommitOid(checkoutPath), await getRef(), diff --git a/lib/init-action.js b/lib/init-action.js index b0e4427f4..a5d822e2c 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -36289,7 +36289,6 @@ var require_package = __commonJS({ "console-log-level": "^1.4.1", del: "^6.1.1", "fast-deep-equal": "^3.1.3", - "file-url": "^3.0.0", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", diff --git a/lib/resolve-environment-action.js b/lib/resolve-environment-action.js index f5d5d6ce8..a9c1568a8 100644 --- a/lib/resolve-environment-action.js +++ b/lib/resolve-environment-action.js @@ -36289,7 +36289,6 @@ var require_package = __commonJS({ "console-log-level": "^1.4.1", del: "^6.1.1", "fast-deep-equal": "^3.1.3", - "file-url": "^3.0.0", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", diff --git a/lib/start-proxy-action-post.js b/lib/start-proxy-action-post.js index 8fdf4c705..ea13dc356 100644 --- a/lib/start-proxy-action-post.js +++ b/lib/start-proxy-action-post.js @@ -36289,7 +36289,6 @@ var require_package = __commonJS({ "console-log-level": "^1.4.1", del: "^6.1.1", "fast-deep-equal": "^3.1.3", - "file-url": "^3.0.0", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", diff --git a/lib/start-proxy-action.js b/lib/start-proxy-action.js index 27b534a82..3d8c3109f 100644 --- a/lib/start-proxy-action.js +++ b/lib/start-proxy-action.js @@ -54817,7 +54817,6 @@ var require_package = __commonJS({ "console-log-level": "^1.4.1", del: "^6.1.1", "fast-deep-equal": "^3.1.3", - "file-url": "^3.0.0", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", diff --git a/lib/upload-lib.js b/lib/upload-lib.js index 5d4c3aeb0..4e00b0d09 100644 --- a/lib/upload-lib.js +++ b/lib/upload-lib.js @@ -283,8 +283,8 @@ var require_proxy = __commonJS({ return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); } var DecodedURL = class extends URL { - constructor(url, base) { - super(url, base); + constructor(url2, base) { + super(url2, base); this._decodedUsername = decodeURIComponent(super.username); this._decodedPassword = decodeURIComponent(super.password); } @@ -957,65 +957,65 @@ var require_util = __commonJS({ function isBlobLike(object) { return Blob2 && object instanceof Blob2 || object && typeof object === "object" && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && /^(Blob|File)$/.test(object[Symbol.toStringTag]); } - function buildURL(url, queryParams) { - if (url.includes("?") || url.includes("#")) { + function buildURL(url2, queryParams) { + if (url2.includes("?") || url2.includes("#")) { throw new Error('Query params cannot be passed when url already contains "?" or "#".'); } const stringified = stringify(queryParams); if (stringified) { - url += "?" + stringified; + url2 += "?" + stringified; } - return url; + return url2; } - function parseURL(url) { - if (typeof url === "string") { - url = new URL(url); - if (!/^https?:/.test(url.origin || url.protocol)) { + function parseURL(url2) { + if (typeof url2 === "string") { + url2 = new URL(url2); + if (!/^https?:/.test(url2.origin || url2.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - return url; + return url2; } - if (!url || typeof url !== "object") { + if (!url2 || typeof url2 !== "object") { throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); } - if (!/^https?:/.test(url.origin || url.protocol)) { + if (!/^https?:/.test(url2.origin || url2.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - if (!(url instanceof URL)) { - if (url.port != null && url.port !== "" && !Number.isFinite(parseInt(url.port))) { + if (!(url2 instanceof URL)) { + if (url2.port != null && url2.port !== "" && !Number.isFinite(parseInt(url2.port))) { throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); } - if (url.path != null && typeof url.path !== "string") { + if (url2.path != null && typeof url2.path !== "string") { throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); } - if (url.pathname != null && typeof url.pathname !== "string") { + if (url2.pathname != null && typeof url2.pathname !== "string") { throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); } - if (url.hostname != null && typeof url.hostname !== "string") { + if (url2.hostname != null && typeof url2.hostname !== "string") { throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); } - if (url.origin != null && typeof url.origin !== "string") { + if (url2.origin != null && typeof url2.origin !== "string") { throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); } - const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; - let origin = url.origin != null ? url.origin : `${url.protocol}//${url.hostname}:${port}`; - let path11 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + const port = url2.port != null ? url2.port : url2.protocol === "https:" ? 443 : 80; + let origin = url2.origin != null ? url2.origin : `${url2.protocol}//${url2.hostname}:${port}`; + let path11 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; if (origin.endsWith("/")) { origin = origin.substring(0, origin.length - 1); } if (path11 && !path11.startsWith("/")) { path11 = `/${path11}`; } - url = new URL(origin + path11); + url2 = new URL(origin + path11); } - return url; + return url2; } - function parseOrigin(url) { - url = parseURL(url); - if (url.pathname !== "/" || url.search || url.hash) { + function parseOrigin(url2) { + url2 = parseURL(url2); + if (url2.pathname !== "/" || url2.search || url2.hash) { throw new InvalidArgumentError("invalid url"); } - return url; + return url2; } function getHostname(host) { if (host[0] === "[") { @@ -3666,8 +3666,8 @@ var require_util2 = __commonJS({ return request.urlList[request.urlList.length - 1]; } function requestBadPort(request) { - const url = requestCurrentURL(request); - if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { + const url2 = requestCurrentURL(request); + if (urlIsHttpHttpsScheme(url2) && badPortsSet.has(url2.port)) { return "blocked"; } return "allowed"; @@ -3881,30 +3881,30 @@ var require_util2 = __commonJS({ return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; } } - function stripURLForReferrer(url, originOnly) { - assert(url instanceof URL); - if (url.protocol === "file:" || url.protocol === "about:" || url.protocol === "blank:") { + function stripURLForReferrer(url2, originOnly) { + assert(url2 instanceof URL); + if (url2.protocol === "file:" || url2.protocol === "about:" || url2.protocol === "blank:") { return "no-referrer"; } - url.username = ""; - url.password = ""; - url.hash = ""; + url2.username = ""; + url2.password = ""; + url2.hash = ""; if (originOnly) { - url.pathname = ""; - url.search = ""; + url2.pathname = ""; + url2.search = ""; } - return url; + return url2; } - function isURLPotentiallyTrustworthy(url) { - if (!(url instanceof URL)) { + function isURLPotentiallyTrustworthy(url2) { + if (!(url2 instanceof URL)) { return false; } - if (url.href === "about:blank" || url.href === "about:srcdoc") { + if (url2.href === "about:blank" || url2.href === "about:srcdoc") { return true; } - if (url.protocol === "data:") return true; - if (url.protocol === "file:") return true; - return isOriginPotentiallyTrustworthy(url.origin); + if (url2.protocol === "data:") return true; + if (url2.protocol === "file:") return true; + return isOriginPotentiallyTrustworthy(url2.origin); function isOriginPotentiallyTrustworthy(origin) { if (origin == null || origin === "null") return false; const originAsURL = new URL(origin); @@ -4174,20 +4174,20 @@ var require_util2 = __commonJS({ byteLength += chunk.length; } } - function urlIsLocal(url) { - assert("protocol" in url); - const protocol = url.protocol; + function urlIsLocal(url2) { + assert("protocol" in url2); + const protocol = url2.protocol; return protocol === "about:" || protocol === "blob:" || protocol === "data:"; } - function urlHasHttpsScheme(url) { - if (typeof url === "string") { - return url.startsWith("https:"); + function urlHasHttpsScheme(url2) { + if (typeof url2 === "string") { + return url2.startsWith("https:"); } - return url.protocol === "https:"; + return url2.protocol === "https:"; } - function urlIsHttpHttpsScheme(url) { - assert("protocol" in url); - const protocol = url.protocol; + function urlIsHttpHttpsScheme(url2) { + assert("protocol" in url2); + const protocol = url2.protocol; return protocol === "http:" || protocol === "https:"; } var hasOwn = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)); @@ -4672,12 +4672,12 @@ var require_dataURL = __commonJS({ } return { mimeType: mimeTypeRecord, body }; } - function URLSerializer(url, excludeFragment = false) { + function URLSerializer(url2, excludeFragment = false) { if (!excludeFragment) { - return url.href; + return url2.href; } - const href = url.href; - const hashLength = url.hash.length; + const href = url2.href; + const hashLength = url2.hash.length; return hashLength === 0 ? href : href.substring(0, href.length - hashLength); } function collectASequenceOfCodePoints(condition, input, position) { @@ -6984,7 +6984,7 @@ var require_client = __commonJS({ * @param {string|URL} url * @param {import('../types/client').Client.Options} options */ - constructor(url, { + constructor(url2, { interceptors, maxHeaderSize, headersTimeout, @@ -7090,7 +7090,7 @@ var require_client = __commonJS({ }); } this[kInterceptors] = interceptors && interceptors.Client && Array.isArray(interceptors.Client) ? interceptors.Client : [createRedirectInterceptor({ maxRedirections })]; - this[kUrl] = util.parseOrigin(url); + this[kUrl] = util.parseOrigin(url2); this[kConnector] = connect2; this[kSocket] = null; this[kPipelining] = pipelining != null ? pipelining : 1; @@ -10556,10 +10556,10 @@ var require_mock_utils = __commonJS({ }; } function checkNetConnect(netConnect, origin) { - const url = new URL(origin); + const url2 = new URL(origin); if (netConnect === true) { return true; - } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) { + } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url2.host))) { return true; } return false; @@ -12001,16 +12001,16 @@ var require_response = __commonJS({ return responseObject; } // Creates a redirect Response that redirects to url with status status. - static redirect(url, status = 302) { + static redirect(url2, status = 302) { const relevantRealm = { settingsObject: {} }; webidl.argumentLengthCheck(arguments, 1, { header: "Response.redirect" }); - url = webidl.converters.USVString(url); + url2 = webidl.converters.USVString(url2); status = webidl.converters["unsigned short"](status); let parsedURL; try { - parsedURL = new URL(url, getGlobalOrigin()); + parsedURL = new URL(url2, getGlobalOrigin()); } catch (err) { - throw Object.assign(new TypeError("Failed to parse URL from " + url), { + throw Object.assign(new TypeError("Failed to parse URL from " + url2), { cause: err }); } @@ -12054,11 +12054,11 @@ var require_response = __commonJS({ get url() { webidl.brandCheck(this, _Response); const urlList = this[kState].urlList; - const url = urlList[urlList.length - 1] ?? null; - if (url === null) { + const url2 = urlList[urlList.length - 1] ?? null; + if (url2 === null) { return ""; } - return URLSerializer(url, true); + return URLSerializer(url2, true); } // Returns whether response was obtained through a redirect. get redirected() { @@ -13850,12 +13850,12 @@ var require_fetch = __commonJS({ } return response; async function dispatch({ body }) { - const url = requestCurrentURL(request); + const url2 = requestCurrentURL(request); const agent = fetchParams.controller.dispatcher; return new Promise((resolve6, reject) => agent.dispatch( { - path: url.pathname + url.search, - origin: url.origin, + path: url2.pathname + url2.search, + origin: url2.origin, method: request.method, body: fetchParams.controller.dispatcher.isMockActive ? request.body && (request.body.source || request.body.stream) : body, headers: request.headersList.entries, @@ -16335,9 +16335,9 @@ var require_connection = __commonJS({ crypto = require("crypto"); } catch { } - function establishWebSocketConnection(url, protocols, ws, onEstablish, options) { - const requestURL = url; - requestURL.protocol = url.protocol === "ws:" ? "http:" : "https:"; + function establishWebSocketConnection(url2, protocols, ws, onEstablish, options) { + const requestURL = url2; + requestURL.protocol = url2.protocol === "ws:" ? "http:" : "https:"; const request = makeRequest({ urlList: [requestURL], serviceWorkers: "none", @@ -16788,7 +16788,7 @@ var require_websocket = __commonJS({ * @param {string} url * @param {string|string[]} protocols */ - constructor(url, protocols = []) { + constructor(url2, protocols = []) { super(); webidl.argumentLengthCheck(arguments, 1, { header: "WebSocket constructor" }); if (!experimentalWarned) { @@ -16798,12 +16798,12 @@ var require_websocket = __commonJS({ }); } const options = webidl.converters["DOMString or sequence or WebSocketInit"](protocols); - url = webidl.converters.USVString(url); + url2 = webidl.converters.USVString(url2); protocols = options.protocols; const baseURL = getGlobalOrigin(); let urlRecord; try { - urlRecord = new URL(url, baseURL); + urlRecord = new URL(url2, baseURL); } catch (e) { throw new DOMException2(e, "SyntaxError"); } @@ -17198,12 +17198,12 @@ var require_undici = __commonJS({ module2.exports.buildConnector = buildConnector; module2.exports.errors = errors; function makeDispatcher(fn) { - return (url, opts, handler) => { + return (url2, opts, handler) => { if (typeof opts === "function") { handler = opts; opts = null; } - if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) { + if (!url2 || typeof url2 !== "string" && typeof url2 !== "object" && !(url2 instanceof URL)) { throw new InvalidArgumentError("invalid url"); } if (opts != null && typeof opts !== "object") { @@ -17217,12 +17217,12 @@ var require_undici = __commonJS({ if (!opts.path.startsWith("/")) { path11 = `/${path11}`; } - url = new URL(util.parseOrigin(url).origin + path11); + url2 = new URL(util.parseOrigin(url2).origin + path11); } else { if (!opts) { - opts = typeof url === "object" ? url : {}; + opts = typeof url2 === "object" ? url2 : {}; } - url = util.parseURL(url); + url2 = util.parseURL(url2); } const { agent, dispatcher = getGlobalDispatcher() } = opts; if (agent) { @@ -17230,8 +17230,8 @@ var require_undici = __commonJS({ } return fn.call(dispatcher, { ...opts, - origin: url.origin, - path: url.search ? `${url.pathname}${url.search}` : url.pathname, + origin: url2.origin, + path: url2.search ? `${url2.pathname}${url2.search}` : url2.pathname, method: opts.method || (opts.body ? "PUT" : "GET") }, handler); }; @@ -19816,32 +19816,6 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } }); -// node_modules/file-url/index.js -var require_file_url = __commonJS({ - "node_modules/file-url/index.js"(exports2, module2) { - "use strict"; - var path11 = require("path"); - module2.exports = (filePath, options) => { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - options = { - resolve: true, - ...options - }; - let pathName = filePath; - if (options.resolve) { - pathName = path11.resolve(filePath); - } - pathName = pathName.replace(/\\/g, "/"); - if (pathName[0] !== "/") { - pathName = `/${pathName}`; - } - return encodeURI(`file://${pathName}`).replace(/[?#]/g, encodeURIComponent); - }; - } -}); - // node_modules/jsonschema/lib/helpers.js var require_helpers = __commonJS({ "node_modules/jsonschema/lib/helpers.js"(exports2, module2) { @@ -21280,8 +21254,8 @@ var require_utils3 = __commonJS({ exports2.getProxyAgentDispatcher = getProxyAgentDispatcher; function getProxyFetch(destinationUrl) { const httpDispatcher = getProxyAgentDispatcher(destinationUrl); - const proxyFetch = (url, opts) => __awaiter4(this, void 0, void 0, function* () { - return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); + const proxyFetch = (url2, opts) => __awaiter4(this, void 0, void 0, function* () { + return (0, undici_1.fetch)(url2, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); }); return proxyFetch; } @@ -21538,8 +21512,8 @@ var require_dist_node2 = __commonJS({ } function merge2(defaults, route, options) { if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { method, url } : { url: method }, options); + let [method, url2] = route.split(" "); + options = Object.assign(url2 ? { method, url: url2 } : { url: method }, options); } else { options = Object.assign({}, route); } @@ -21557,13 +21531,13 @@ var require_dist_node2 = __commonJS({ } return mergedOptions; } - function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; + function addQueryParameters(url2, parameters) { + const separator = /\?/.test(url2) ? "&" : "?"; const names = Object.keys(parameters); if (names.length === 0) { - return url; + return url2; } - return url + separator + names.map((name) => { + return url2 + separator + names.map((name) => { if (name === "q") { return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); } @@ -21574,8 +21548,8 @@ var require_dist_node2 = __commonJS({ function removeNonChars(variableName) { return variableName.replace(/(?:^\W+)|(?:(? urlVariableNames.includes(option)).concat("baseUrl"); const remainingParameters = omit(parameters, omittedParameters); @@ -21750,7 +21724,7 @@ var require_dist_node2 = __commonJS({ ) ).join(","); } - if (url.endsWith("/graphql")) { + if (url2.endsWith("/graphql")) { if (options.mediaType.previews?.length) { const previewsFromAcceptHeader = headers.accept.match(/(? { @@ -21761,7 +21735,7 @@ var require_dist_node2 = __commonJS({ } } if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); + url2 = addQueryParameters(url2, remainingParameters); } else { if ("data" in remainingParameters) { body = remainingParameters.data; @@ -21778,7 +21752,7 @@ var require_dist_node2 = __commonJS({ body = ""; } return Object.assign( - { method, url, headers }, + { method, url: url2, headers }, typeof body !== "undefined" ? { body } : null, options.request ? { request: options.request } : null ); @@ -22037,7 +22011,7 @@ var require_dist_node5 = __commonJS({ } let headers = {}; let status; - let url; + let url2; let { fetch } = globalThis; if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { fetch = requestOptions.request.fetch; @@ -22057,7 +22031,7 @@ var require_dist_node5 = __commonJS({ // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. ...requestOptions.body && { duplex: "half" } }).then(async (response) => { - url = response.url; + url2 = response.url; status = response.status; for (const keyAndValue of response.headers) { headers[keyAndValue[0]] = keyAndValue[1]; @@ -22078,7 +22052,7 @@ var require_dist_node5 = __commonJS({ } throw new import_request_error.RequestError(response.statusText, status, { response: { - url, + url: url2, status, headers, data: void 0 @@ -22089,7 +22063,7 @@ var require_dist_node5 = __commonJS({ if (status === 304) { throw new import_request_error.RequestError("Not modified", status, { response: { - url, + url: url2, status, headers, data: await getResponseData(response) @@ -22101,7 +22075,7 @@ var require_dist_node5 = __commonJS({ const data = await getResponseData(response); const error2 = new import_request_error.RequestError(toErrorMessage(data), status, { response: { - url, + url: url2, status, headers, data @@ -22114,7 +22088,7 @@ var require_dist_node5 = __commonJS({ }).then((data) => { return { status, - url, + url: url2, headers, data }; @@ -22278,8 +22252,8 @@ var require_dist_node6 = __commonJS({ } function merge2(defaults, route, options) { if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { method, url } : { url: method }, options); + let [method, url2] = route.split(" "); + options = Object.assign(url2 ? { method, url: url2 } : { url: method }, options); } else { options = Object.assign({}, route); } @@ -22297,13 +22271,13 @@ var require_dist_node6 = __commonJS({ } return mergedOptions; } - function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; + function addQueryParameters(url2, parameters) { + const separator = /\?/.test(url2) ? "&" : "?"; const names = Object.keys(parameters); if (names.length === 0) { - return url; + return url2; } - return url + separator + names.map((name) => { + return url2 + separator + names.map((name) => { if (name === "q") { return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); } @@ -22314,8 +22288,8 @@ var require_dist_node6 = __commonJS({ function removeNonChars(variableName) { return variableName.replace(/(?:^\W+)|(?:(? urlVariableNames.includes(option)).concat("baseUrl"); const remainingParameters = omit(parameters, omittedParameters); @@ -22490,7 +22464,7 @@ var require_dist_node6 = __commonJS({ ) ).join(","); } - if (url.endsWith("/graphql")) { + if (url2.endsWith("/graphql")) { if (options.mediaType.previews?.length) { const previewsFromAcceptHeader = headers.accept.match(/(? { @@ -22501,7 +22475,7 @@ var require_dist_node6 = __commonJS({ } } if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); + url2 = addQueryParameters(url2, remainingParameters); } else { if ("data" in remainingParameters) { body = remainingParameters.data; @@ -22518,7 +22492,7 @@ var require_dist_node6 = __commonJS({ body = ""; } return Object.assign( - { method, url, headers }, + { method, url: url2, headers }, typeof body !== "undefined" ? { body } : null, options.request ? { request: options.request } : null ); @@ -22685,7 +22659,7 @@ var require_dist_node8 = __commonJS({ } let headers = {}; let status; - let url; + let url2; let { fetch } = globalThis; if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { fetch = requestOptions.request.fetch; @@ -22705,7 +22679,7 @@ var require_dist_node8 = __commonJS({ // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. ...requestOptions.body && { duplex: "half" } }).then(async (response) => { - url = response.url; + url2 = response.url; status = response.status; for (const keyAndValue of response.headers) { headers[keyAndValue[0]] = keyAndValue[1]; @@ -22726,7 +22700,7 @@ var require_dist_node8 = __commonJS({ } throw new import_request_error.RequestError(response.statusText, status, { response: { - url, + url: url2, status, headers, data: void 0 @@ -22737,7 +22711,7 @@ var require_dist_node8 = __commonJS({ if (status === 304) { throw new import_request_error.RequestError("Not modified", status, { response: { - url, + url: url2, status, headers, data: await getResponseData(response) @@ -22749,7 +22723,7 @@ var require_dist_node8 = __commonJS({ const data = await getResponseData(response); const error2 = new import_request_error.RequestError(toErrorMessage(data), status, { response: { - url, + url: url2, status, headers, data @@ -22762,7 +22736,7 @@ var require_dist_node8 = __commonJS({ }).then((data) => { return { status, - url, + url: url2, headers, data }; @@ -25230,11 +25204,11 @@ var require_dist_node12 = __commonJS({ for (const [scope, endpoints] of Object.entries(endpoints_default)) { for (const [methodName, endpoint] of Object.entries(endpoints)) { const [route, defaults, decorations] = endpoint; - const [method, url] = route.split(/ /); + const [method, url2] = route.split(/ /); const endpointDefaults = Object.assign( { method, - url + url: url2 }, defaults ); @@ -25428,23 +25402,23 @@ var require_dist_node13 = __commonJS({ const requestMethod = typeof route === "function" ? route : octokit.request; const method = options.method; const headers = options.headers; - let url = options.url; + let url2 = options.url; return { [Symbol.asyncIterator]: () => ({ async next() { - if (!url) + if (!url2) return { done: true }; try { - const response = await requestMethod({ method, url, headers }); + const response = await requestMethod({ method, url: url2, headers }); const normalizedResponse = normalizePaginatedListResponse(response); - url = ((normalizedResponse.headers.link || "").match( + url2 = ((normalizedResponse.headers.link || "").match( /<([^<>]+)>;\s*rel="next"/ ) || [])[1]; return { value: normalizedResponse }; } catch (error2) { if (error2.status !== 409) throw error2; - url = ""; + url2 = ""; return { value: { status: 200, @@ -37612,7 +37586,6 @@ var require_package = __commonJS({ "console-log-level": "^1.4.1", del: "^6.1.1", "fast-deep-equal": "^3.1.3", - "file-url": "^3.0.0", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", @@ -42423,16 +42396,16 @@ var require_sanitizer = __commonJS({ if (typeof value !== "string" || value === null || value === "") { return value; } - const url = new URL(value); - if (!url.search) { + const url2 = new URL(value); + if (!url2.search) { return value; } - for (const [key] of url.searchParams) { + for (const [key] of url2.searchParams) { if (!this.allowedQueryParameters.has(key.toLowerCase())) { - url.searchParams.set(key, RedactedString); + url2.searchParams.set(key, RedactedString); } } - return url.toString(); + return url2.toString(); } sanitizeHeaders(obj) { const sanitized = {}; @@ -42521,8 +42494,8 @@ var require_redirectPolicy = __commonJS({ const { request, status, headers } = response; const locationHeader = headers.get("location"); if (locationHeader && (status === 300 || status === 301 && allowedRedirect.includes(request.method) || status === 302 && allowedRedirect.includes(request.method) || status === 303 && request.method === "POST" || status === 307) && currentRetries < maxRetries) { - const url = new URL(locationHeader, request.url); - request.url = url.toString(); + const url2 = new URL(locationHeader, request.url); + request.url = url2.toString(); if (status === 303) { request.method = "GET"; request.headers.delete("Content-Length"); @@ -44726,9 +44699,9 @@ var require_helpers3 = __commonJS({ } } exports2.json = json2; - function req(url, opts = {}) { - const href = typeof url === "string" ? url : url.href; - const req2 = (href.startsWith("https:") ? https2 : http).request(url, opts); + function req(url2, opts = {}) { + const href = typeof url2 === "string" ? url2 : url2.href; + const req2 = (href.startsWith("https:") ? https2 : http).request(url2, opts); const promise = new Promise((resolve6, reject) => { req2.once("response", resolve6).once("error", reject).end(); }); @@ -45208,11 +45181,11 @@ var require_dist4 = __commonJS({ const protocol = opts.secureEndpoint ? "https:" : "http:"; const hostname = req.getHeader("host") || "localhost"; const base = `${protocol}//${hostname}`; - const url = new url_1.URL(req.path, base); + const url2 = new url_1.URL(req.path, base); if (opts.port !== 80) { - url.port = String(opts.port); + url2.port = String(opts.port); } - req.path = String(url); + req.path = String(url2); const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders }; if (proxy.username || proxy.password) { const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; @@ -45383,8 +45356,8 @@ var require_proxyPolicy = __commonJS({ if (request.agent) { return; } - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; + const url2 = new URL(request.url); + const isInsecure = url2.protocol !== "https:"; if (request.tlsSettings) { log_js_1.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored."); } @@ -46031,17 +46004,17 @@ var require_nodeHttpClient = __commonJS({ } makeRequest(request, abortController, body) { var _a; - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; + const url2 = new URL(request.url); + const isInsecure = url2.protocol !== "https:"; if (isInsecure && !request.allowInsecureConnection) { throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); } const agent = (_a = request.agent) !== null && _a !== void 0 ? _a : this.getOrCreateAgent(request, isInsecure); const options = { agent, - hostname: url.hostname, - path: `${url.pathname}${url.search}`, - port: url.port, + hostname: url2.hostname, + path: `${url2.pathname}${url2.search}`, + port: url2.port, method: request.method, headers: request.headers.toJSON({ preserveCase: true }) }; @@ -49420,14 +49393,14 @@ var require_urlHelpers = __commonJS({ } return result; } - function isAbsoluteUrl(url) { - return url.includes("://"); + function isAbsoluteUrl(url2) { + return url2.includes("://"); } - function appendPath(url, pathToAppend) { + function appendPath(url2, pathToAppend) { if (!pathToAppend) { - return url; + return url2; } - const parsedUrl = new URL(url); + const parsedUrl = new URL(url2); let newPath = parsedUrl.pathname; if (!newPath.endsWith("/")) { newPath = `${newPath}/`; @@ -49518,11 +49491,11 @@ var require_urlHelpers = __commonJS({ } return result; } - function appendQueryParams(url, queryParams, sequenceParams, noOverwrite = false) { + function appendQueryParams(url2, queryParams, sequenceParams, noOverwrite = false) { if (queryParams.size === 0) { - return url; + return url2; } - const parsedUrl = new URL(url); + const parsedUrl = new URL(url2); const combinedParams = simpleParseQueryParams(parsedUrl.search); for (const [name, value] of queryParams) { const existingValue = combinedParams.get(name); @@ -49633,9 +49606,9 @@ var require_serviceClient = __commonJS({ if (!endpoint) { throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use."); } - const url = (0, urlHelpers_js_1.getRequestUrl)(endpoint, operationSpec, operationArguments, this); + const url2 = (0, urlHelpers_js_1.getRequestUrl)(endpoint, operationSpec, operationArguments, this); const request = (0, core_rest_pipeline_1.createPipelineRequest)({ - url + url: url2 }); request.method = operationSpec.httpMethod; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); @@ -53586,8 +53559,8 @@ var require_dist7 = __commonJS({ "11103", "11104" ]; - function escapeURLPath(url2) { - const urlParsed = new URL(url2); + function escapeURLPath(url3) { + const urlParsed = new URL(url3); let path11 = urlParsed.pathname; path11 = path11 || "/"; path11 = escape(path11); @@ -53674,15 +53647,15 @@ var require_dist7 = __commonJS({ function escape(text) { return encodeURIComponent(text).replace(/%2F/g, "/").replace(/'/g, "%27").replace(/\+/g, "%20").replace(/%25/g, "%"); } - function appendToURLPath(url2, name) { - const urlParsed = new URL(url2); + function appendToURLPath(url3, name) { + const urlParsed = new URL(url3); let path11 = urlParsed.pathname; path11 = path11 ? path11.endsWith("/") ? `${path11}${name}` : `${path11}/${name}` : name; urlParsed.pathname = path11; return urlParsed.toString(); } - function setURLParameter(url2, name, value) { - const urlParsed = new URL(url2); + function setURLParameter(url3, name, value) { + const urlParsed = new URL(url3); const encodedName = encodeURIComponent(name); const encodedValue = value ? encodeURIComponent(value) : void 0; const searchString = urlParsed.search === "" ? "?" : urlParsed.search; @@ -53701,34 +53674,34 @@ var require_dist7 = __commonJS({ urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return urlParsed.toString(); } - function getURLParameter(url2, name) { + function getURLParameter(url3, name) { var _a; - const urlParsed = new URL(url2); + const urlParsed = new URL(url3); return (_a = urlParsed.searchParams.get(name)) !== null && _a !== void 0 ? _a : void 0; } - function setURLHost(url2, host) { - const urlParsed = new URL(url2); + function setURLHost(url3, host) { + const urlParsed = new URL(url3); urlParsed.hostname = host; return urlParsed.toString(); } - function getURLPath(url2) { + function getURLPath(url3) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url3); return urlParsed.pathname; } catch (e) { return void 0; } } - function getURLScheme(url2) { + function getURLScheme(url3) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url3); return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; } catch (e) { return void 0; } } - function getURLPathAndQuery(url2) { - const urlParsed = new URL(url2); + function getURLPathAndQuery(url3) { + const urlParsed = new URL(url3); const pathString = urlParsed.pathname; if (!pathString) { throw new RangeError("Invalid url without valid path."); @@ -53740,8 +53713,8 @@ var require_dist7 = __commonJS({ } return `${pathString}${queryString}`; } - function getURLQueries(url2) { - let queryString = new URL(url2).search; + function getURLQueries(url3) { + let queryString = new URL(url3).search; if (!queryString) { return {}; } @@ -53762,8 +53735,8 @@ var require_dist7 = __commonJS({ } return queries; } - function appendToURLQuery(url2, queryParts) { - const urlParsed = new URL(url2); + function appendToURLQuery(url3, queryParts) { + const urlParsed = new URL(url3); let query = urlParsed.search; if (query) { query += "&" + queryParts; @@ -53829,8 +53802,8 @@ var require_dist7 = __commonJS({ function iEqual(str1, str2) { return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } - function getAccountNameFromUrl(url2) { - const parsedUrl = new URL(url2); + function getAccountNameFromUrl(url3) { + const parsedUrl = new URL(url3); let accountName; try { if (parsedUrl.hostname.split(".")[1] === "blob") { @@ -63768,7 +63741,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var url = { + var url2 = { parameterPath: "url", mapper: { serializedName: "url", @@ -65444,7 +65417,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp, timeoutInSeconds ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -65474,7 +65447,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp, timeoutInSeconds ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65501,7 +65474,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, comp1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65531,7 +65504,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; maxPageSize, include ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65559,7 +65532,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, comp3 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -65588,7 +65561,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, restype1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65615,7 +65588,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body, queryParameters: [timeoutInSeconds, comp4], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ accept, version, @@ -65648,7 +65621,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp5, where ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65836,7 +65809,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65862,7 +65835,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65885,7 +65858,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65914,7 +65887,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp6 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65955,7 +65928,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp7 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65983,7 +65956,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp7 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -66016,7 +65989,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp8 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66044,7 +66017,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp9 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66077,7 +66050,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp4, restype2 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ accept, version, @@ -66111,7 +66084,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; where, restype2 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66137,7 +66110,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66168,7 +66141,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66198,7 +66171,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66228,7 +66201,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66258,7 +66231,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66294,7 +66267,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, include1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66326,7 +66299,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; include1, delimiter ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66352,7 +66325,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, restype1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66616,7 +66589,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, versionId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66654,7 +66627,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, versionId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66690,7 +66663,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, blobDeleteType ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66719,7 +66692,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp8], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66741,7 +66714,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp11], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66765,7 +66738,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66799,7 +66772,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66824,7 +66797,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66846,7 +66819,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp13], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66869,7 +66842,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp6], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66902,7 +66875,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66932,7 +66905,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66961,7 +66934,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66990,7 +66963,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67020,7 +66993,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67049,7 +67022,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp14], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67082,7 +67055,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67124,7 +67097,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67172,7 +67145,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp15, copyId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67204,7 +67177,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, comp16 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67234,7 +67207,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, restype1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67272,7 +67245,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, comp17 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -67312,7 +67285,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, comp18 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67341,7 +67314,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, comp18 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -67475,7 +67448,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67524,7 +67497,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body1, queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67567,7 +67540,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67605,7 +67578,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67659,7 +67632,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, comp20 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67696,7 +67669,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp20, prevsnapshot ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67726,7 +67699,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67759,7 +67732,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67789,7 +67762,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp21], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67870,7 +67843,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67916,7 +67889,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body1, queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67956,7 +67929,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -68001,7 +67974,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp23], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -68121,7 +68094,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body1, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -68172,7 +68145,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -68231,7 +68204,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp24, blockId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -68268,7 +68241,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp24, blockId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -68306,7 +68279,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: blocks, queryParameters: [timeoutInSeconds, comp25], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -68361,7 +68334,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp25, listType ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -68379,9 +68352,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * operation. * @param options The parameter options */ - constructor(url2, options) { + constructor(url3, options) { var _a, _b; - if (url2 === void 0) { + if (url3 === void 0) { throw new Error("'url' cannot be null"); } if (!options) { @@ -68396,7 +68369,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; userAgentPrefix }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{url}" }); super(optionsWithDefaults); - this.url = url2; + this.url = url3; this.version = options.version || "2024-11-04"; this.service = new ServiceImpl(this); this.container = new ContainerImpl(this); @@ -68421,9 +68394,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param url - url to resource * @param pipeline - request policy pipeline. */ - constructor(url2, pipeline) { - this.url = escapeURLPath(url2); - this.accountName = getAccountNameFromUrl(url2); + constructor(url3, pipeline) { + this.url = escapeURLPath(url3); + this.accountName = getAccountNameFromUrl(url3); this.pipeline = pipeline; this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline)); this.isHttps = iEqual(getURLScheme(this.url) || "", "https"); @@ -71681,16 +71654,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { options = options || {}; let pipeline; - let url2; + let url3; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } @@ -71702,7 +71675,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -71711,7 +71684,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -71719,7 +71692,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); ({ blobName: this._name, containerName: this._containerName } = this.getBlobAndContainerNamesFromUrl()); this.blobContext = this.storageClientContext.blob; this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT); @@ -72567,17 +72540,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; var AppendBlobClient = class _AppendBlobClient extends BlobClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(new AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; @@ -72586,7 +72559,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -72595,7 +72568,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -72603,7 +72576,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); this.appendBlobContext = this.storageClientContext.appendBlob; } /** @@ -72782,17 +72755,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; var BlockBlobClient = class _BlockBlobClient extends BlobClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } @@ -72804,7 +72777,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -72813,7 +72786,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -72821,7 +72794,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); this.blockBlobContext = this.storageClientContext.blockBlob; this._blobContext = this.storageClientContext.blob; } @@ -73329,17 +73302,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; var PageBlobClient = class _PageBlobClient extends BlobClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(new AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; @@ -73348,7 +73321,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -73357,7 +73330,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -73365,7 +73338,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); this.pageBlobContext = this.storageClientContext.pageBlob; } /** @@ -74236,13 +74209,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { - let url2; + let url3; let credential; if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrOptions instanceof StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrOptions))) { - url2 = urlOrBlobClient; + url3 = urlOrBlobClient; credential = credentialOrOptions; } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + url3 = urlOrBlobClient.url; credential = urlOrBlobClient.credential; options = credentialOrOptions; } else { @@ -74254,23 +74227,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("delete"); await this.addSubRequestInternal({ - url: url2, + url: url3, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).delete(updatedOptions); + await new BlobClient(url3, this.batchRequest.createPipeline(credential)).delete(updatedOptions); }); }); } async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { - let url2; + let url3; let credential; let tier2; if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrTier instanceof StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrTier))) { - url2 = urlOrBlobClient; + url3 = urlOrBlobClient; credential = credentialOrTier; tier2 = tierOrOptions; } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + url3 = urlOrBlobClient.url; credential = urlOrBlobClient.credential; tier2 = credentialOrTier; options = tierOrOptions; @@ -74283,10 +74256,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("setAccessTier"); await this.addSubRequestInternal({ - url: url2, + url: url3, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); + await new BlobClient(url3, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); }); }); } @@ -74409,7 +74382,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } var BlobBatchClient = class { - constructor(url2, credentialOrPipeline, options) { + constructor(url3, credentialOrPipeline, options) { let pipeline; if (isPipelineLike(credentialOrPipeline)) { pipeline = credentialOrPipeline; @@ -74418,8 +74391,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { pipeline = newPipeline(credentialOrPipeline, options); } - const storageClientContext = new StorageContextClient(url2, getCoreClientOptions(pipeline)); - const path11 = getURLPath(url2); + const storageClientContext = new StorageContextClient(url3, getCoreClientOptions(pipeline)); + const path11 = getURLPath(url3); if (path11 && path11 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { @@ -74523,16 +74496,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(new AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string") { const containerName = credentialOrPipelineOrContainerName; @@ -74540,7 +74513,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); + url3 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -74549,7 +74522,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -74557,7 +74530,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName parameter"); } - super(url2, pipeline); + super(url3, pipeline); this._containerName = this.getContainerNameFromUrl(); this.containerContext = this.storageClientContext.container; } @@ -76006,7 +75979,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } - constructor(url2, credentialOrPipeline, options) { + constructor(url3, credentialOrPipeline, options) { let pipeline; if (isPipelineLike(credentialOrPipeline)) { pipeline = credentialOrPipeline; @@ -76015,7 +75988,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { pipeline = newPipeline(new AnonymousCredential(), options); } - super(url2, pipeline); + super(url3, pipeline); this.serviceContext = this.storageClientContext.service; } /** @@ -77777,9 +77750,9 @@ var require_cacheHttpClient = __commonJS({ if (!baseUrl) { throw new Error("Cache Service Url not found, unable to restore cache."); } - const url = `${baseUrl}_apis/artifactcache/${resource}`; - core12.debug(`Resource Url: ${url}`); - return url; + const url2 = `${baseUrl}_apis/artifactcache/${resource}`; + core12.debug(`Resource Url: ${url2}`); + return url2; } function createAcceptHeader(type2, apiVersion) { return `${type2};api-version=${apiVersion}`; @@ -82873,18 +82846,18 @@ var require_util10 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.maskSecretUrls = exports2.maskSigUrl = void 0; var core_1 = require_core(); - function maskSigUrl(url) { - if (!url) + function maskSigUrl(url2) { + if (!url2) return; try { - const parsedUrl = new URL(url); + const parsedUrl = new URL(url2); const signature = parsedUrl.searchParams.get("sig"); if (signature) { (0, core_1.setSecret)(signature); (0, core_1.setSecret)(encodeURIComponent(signature)); } } catch (error2) { - (0, core_1.debug)(`Failed to parse URL: ${url} ${error2 instanceof Error ? error2.message : String(error2)}`); + (0, core_1.debug)(`Failed to parse URL: ${url2} ${error2 instanceof Error ? error2.message : String(error2)}`); } } exports2.maskSigUrl = maskSigUrl; @@ -82970,14 +82943,14 @@ var require_cacheTwirpClient = __commonJS({ // JSON generated client. request(service, method, contentType, data) { return __awaiter4(this, void 0, void 0, function* () { - const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; - (0, core_1.debug)(`[Request] ${method} ${url}`); + const url2 = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; + (0, core_1.debug)(`[Request] ${method} ${url2}`); const headers = { "Content-Type": contentType }; try { const { body } = yield this.retryableRequest(() => __awaiter4(this, void 0, void 0, function* () { - return this.httpClient.post(url, JSON.stringify(data), headers); + return this.httpClient.post(url2, JSON.stringify(data), headers); })); return body; } catch (error2) { @@ -84070,18 +84043,18 @@ var require_tool_cache = __commonJS({ var IS_WINDOWS = process.platform === "win32"; var IS_MAC = process.platform === "darwin"; var userAgent = "actions/tool-cache"; - function downloadTool2(url, dest, auth, headers) { + function downloadTool2(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { dest = dest || path11.join(_getTempDirectory(), crypto.randomUUID()); yield io6.mkdirP(path11.dirname(dest)); - core12.debug(`Downloading ${url}`); + core12.debug(`Downloading ${url2}`); core12.debug(`Destination ${dest}`); const maxAttempts = 3; const minSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS", 10); const maxSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS", 20); const retryHelper = new retry_helper_1.RetryHelper(maxAttempts, minSeconds, maxSeconds); return yield retryHelper.execute(() => __awaiter4(this, void 0, void 0, function* () { - return yield downloadToolAttempt(url, dest || "", auth, headers); + return yield downloadToolAttempt(url2, dest || "", auth, headers); }), (err) => { if (err instanceof HTTPError && err.httpStatusCode) { if (err.httpStatusCode < 500 && err.httpStatusCode !== 408 && err.httpStatusCode !== 429) { @@ -84093,7 +84066,7 @@ var require_tool_cache = __commonJS({ }); } exports2.downloadTool = downloadTool2; - function downloadToolAttempt(url, dest, auth, headers) { + function downloadToolAttempt(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { if (fs11.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); @@ -84108,10 +84081,10 @@ var require_tool_cache = __commonJS({ } headers.authorization = auth; } - const response = yield http.get(url, headers); + const response = yield http.get(url2, headers); if (response.message.statusCode !== 200) { const err = new HTTPError(response.message.statusCode); - core12.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); + core12.debug(`Failed to download from "${url2}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); throw err; } const pipeline = util.promisify(stream2.pipeline); @@ -84587,8 +84560,8 @@ var require_debug2 = __commonJS({ // node_modules/follow-redirects/index.js var require_follow_redirects = __commonJS({ "node_modules/follow-redirects/index.js"(exports2, module2) { - var url = require("url"); - var URL2 = url.URL; + var url2 = require("url"); + var URL2 = url2.URL; var http = require("http"); var https2 = require("https"); var Writable = require("stream").Writable; @@ -84840,7 +84813,7 @@ var require_follow_redirects = __commonJS({ for (var event of events) { request.on(event, eventHandlers[event]); } - this._currentUrl = /^\//.test(this._options.path) ? url.format(this._options) : ( + this._currentUrl = /^\//.test(this._options.path) ? url2.format(this._options) : ( // When making a request to a proxy, […] // a client MUST send the target URI in absolute-form […]. this._options.path @@ -84908,7 +84881,7 @@ var require_follow_redirects = __commonJS({ var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); var currentUrlParts = parseUrl(this._currentUrl); var currentHost = currentHostHeader || currentUrlParts.host; - var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url.format(Object.assign(currentUrlParts, { host: currentHost })); + var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url2.format(Object.assign(currentUrlParts, { host: currentHost })); var redirectUrl = resolveUrl(location, currentUrl); debug2("redirecting to", redirectUrl.href); this._isRedirect = true; @@ -84986,7 +84959,7 @@ var require_follow_redirects = __commonJS({ if (useNativeURL) { parsed = new URL2(input); } else { - parsed = validateUrl(url.parse(input)); + parsed = validateUrl(url2.parse(input)); if (!isString(parsed.protocol)) { throw new InvalidUrlError({ input }); } @@ -84994,7 +84967,7 @@ var require_follow_redirects = __commonJS({ return parsed; } function resolveUrl(relative2, base) { - return useNativeURL ? new URL2(relative2, base) : parseUrl(url.resolve(base, relative2)); + return useNativeURL ? new URL2(relative2, base) : parseUrl(url2.resolve(base, relative2)); } function validateUrl(input) { if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { @@ -88001,9 +87974,9 @@ __export(upload_lib_exports, { module.exports = __toCommonJS(upload_lib_exports); var fs10 = __toESM(require("fs")); var path10 = __toESM(require("path")); +var url = __toESM(require("url")); var import_zlib = __toESM(require("zlib")); var core11 = __toESM(require_core()); -var import_file_url = __toESM(require_file_url()); var jsonschema = __toESM(require_lib2()); // src/actions-util.ts @@ -90701,25 +90674,25 @@ function parseGitHubUrl(inputUrl) { if (!inputUrl.startsWith("http://") && !inputUrl.startsWith("https://")) { throw new ConfigurationError(`"${originalUrl}" is not a http or https URL`); } - let url; + let url2; try { - url = new URL(inputUrl); + url2 = new URL(inputUrl); } catch { throw new ConfigurationError(`"${originalUrl}" is not a valid URL`); } - if (url.hostname === "github.com" || url.hostname === "api.github.com") { + if (url2.hostname === "github.com" || url2.hostname === "api.github.com") { return GITHUB_DOTCOM_URL; } - if (url.pathname.indexOf("/api/v3") !== -1) { - url.pathname = url.pathname.substring(0, url.pathname.indexOf("/api/v3")); + if (url2.pathname.indexOf("/api/v3") !== -1) { + url2.pathname = url2.pathname.substring(0, url2.pathname.indexOf("/api/v3")); } - if (url.hostname.startsWith("api.")) { - url.hostname = url.hostname.substring(4); + if (url2.hostname.startsWith("api.")) { + url2.hostname = url2.hostname.substring(4); } - if (!url.pathname.endsWith("/")) { - url.pathname = `${url.pathname}/`; + if (!url2.pathname.endsWith("/")) { + url2.pathname = `${url2.pathname}/`; } - return url.toString(); + return url2.toString(); } var ExhaustivityCheckingError = class extends Error { constructor(expectedExhaustiveValue) { @@ -92300,10 +92273,10 @@ function writeToolcacheMarkerFile(extractedPath, logger) { fs6.writeFileSync(markerFilePath, ""); logger.info(`Created toolcache marker file ${markerFilePath}`); } -function sanitizeUrlForStatusReport(url) { +function sanitizeUrlForStatusReport(url2) { return ["github/codeql-action", "dsp-testing/codeql-cli-nightlies"].some( - (repo) => url.startsWith(`https://github.com/${repo}/releases/download/`) - ) ? url : "sanitized-value"; + (repo) => url2.startsWith(`https://github.com/${repo}/releases/download/`) + ) ? url2 : "sanitized-value"; } // src/setup-codeql.ts @@ -92394,16 +92367,16 @@ function tryGetBundleVersionFromTagName(tagName, logger) { } return match[1]; } -function tryGetTagNameFromUrl(url, logger) { - const matches = [...url.matchAll(/\/(codeql-bundle-[^/]*)\//g)]; +function tryGetTagNameFromUrl(url2, logger) { + const matches = [...url2.matchAll(/\/(codeql-bundle-[^/]*)\//g)]; if (matches.length === 0) { - logger.debug(`Could not determine tag name for URL ${url}.`); + logger.debug(`Could not determine tag name for URL ${url2}.`); return void 0; } const match = matches[matches.length - 1]; if (match === null || match.length !== 2) { logger.debug( - `Could not determine tag name for URL ${url}. Matched ${JSON.stringify( + `Could not determine tag name for URL ${url2}. Matched ${JSON.stringify( match )}.` ); @@ -92479,13 +92452,13 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian } let cliVersion2; let tagName; - let url; + let url2; if (forceShippedTools) { cliVersion2 = cliVersion; tagName = bundleVersion; } else if (toolsInput !== void 0) { tagName = tryGetTagNameFromUrl(toolsInput, logger); - url = toolsInput; + url2 = toolsInput; if (tagName) { const bundleVersion3 = tryGetBundleVersionFromTagName(tagName, logger); if (bundleVersion3 && semver7.valid(bundleVersion3)) { @@ -92497,9 +92470,9 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian tagName = defaultCliVersion.tagName; } const bundleVersion2 = tagName && tryGetBundleVersionFromTagName(tagName, logger); - const humanReadableVersion = cliVersion2 ?? (bundleVersion2 && convertToSemVer(bundleVersion2, logger)) ?? tagName ?? url ?? "unknown"; + const humanReadableVersion = cliVersion2 ?? (bundleVersion2 && convertToSemVer(bundleVersion2, logger)) ?? tagName ?? url2 ?? "unknown"; logger.debug( - `Attempting to obtain CodeQL tools. CLI version: ${cliVersion2 ?? "unknown"}, bundle tag name: ${tagName ?? "unknown"}, URL: ${url ?? "unspecified"}.` + `Attempting to obtain CodeQL tools. CLI version: ${cliVersion2 ?? "unknown"}, bundle tag name: ${tagName ?? "unknown"}, URL: ${url2 ?? "unspecified"}.` ); let codeqlFolder; if (cliVersion2) { @@ -92581,32 +92554,32 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian } } let compressionMethod; - if (!url) { + if (!url2) { compressionMethod = cliVersion2 !== void 0 && await useZstdBundle(cliVersion2, tarSupportsZstd) ? "zstd" : "gzip"; - url = await getCodeQLBundleDownloadURL( + url2 = await getCodeQLBundleDownloadURL( tagName, apiDetails, compressionMethod, logger ); } else { - const method = inferCompressionMethod(url); + const method = inferCompressionMethod(url2); if (method === void 0) { throw new ConfigurationError( - `Could not infer compression method from URL ${url}. Please specify a URL ending in '.tar.gz' or '.tar.zst'.` + `Could not infer compression method from URL ${url2}. Please specify a URL ending in '.tar.gz' or '.tar.zst'.` ); } compressionMethod = method; } if (cliVersion2) { - logger.info(`Using CodeQL CLI version ${cliVersion2} sourced from ${url} .`); + logger.info(`Using CodeQL CLI version ${cliVersion2} sourced from ${url2} .`); } else { - logger.info(`Using CodeQL CLI sourced from ${url} .`); + logger.info(`Using CodeQL CLI sourced from ${url2} .`); } return { bundleVersion: tagName && tryGetBundleVersionFromTagName(tagName, logger), cliVersion: cliVersion2, - codeqlURL: url, + codeqlURL: url2, compressionMethod, sourceType: "download", toolsVersion: cliVersion2 ?? humanReadableVersion @@ -94950,7 +94923,7 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features const sarifPayload = JSON.stringify(sarif); logger.debug(`Compressing serialized SARIF`); const zippedSarif = import_zlib.default.gzipSync(sarifPayload).toString("base64"); - const checkoutURI = (0, import_file_url.default)(checkoutPath); + const checkoutURI = url.pathToFileURL(checkoutPath).href; const payload = buildPayload( await getCommitOid(checkoutPath), await getRef(), diff --git a/lib/upload-sarif-action-post.js b/lib/upload-sarif-action-post.js index a61d42310..3b799ba74 100644 --- a/lib/upload-sarif-action-post.js +++ b/lib/upload-sarif-action-post.js @@ -36289,7 +36289,6 @@ var require_package = __commonJS({ "console-log-level": "^1.4.1", del: "^6.1.1", "fast-deep-equal": "^3.1.3", - "file-url": "^3.0.0", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", diff --git a/lib/upload-sarif-action.js b/lib/upload-sarif-action.js index 90d73b080..3fb37f3e4 100644 --- a/lib/upload-sarif-action.js +++ b/lib/upload-sarif-action.js @@ -283,8 +283,8 @@ var require_proxy = __commonJS({ return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); } var DecodedURL = class extends URL { - constructor(url, base) { - super(url, base); + constructor(url2, base) { + super(url2, base); this._decodedUsername = decodeURIComponent(super.username); this._decodedPassword = decodeURIComponent(super.password); } @@ -957,65 +957,65 @@ var require_util = __commonJS({ function isBlobLike(object) { return Blob2 && object instanceof Blob2 || object && typeof object === "object" && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && /^(Blob|File)$/.test(object[Symbol.toStringTag]); } - function buildURL(url, queryParams) { - if (url.includes("?") || url.includes("#")) { + function buildURL(url2, queryParams) { + if (url2.includes("?") || url2.includes("#")) { throw new Error('Query params cannot be passed when url already contains "?" or "#".'); } const stringified = stringify(queryParams); if (stringified) { - url += "?" + stringified; + url2 += "?" + stringified; } - return url; + return url2; } - function parseURL(url) { - if (typeof url === "string") { - url = new URL(url); - if (!/^https?:/.test(url.origin || url.protocol)) { + function parseURL(url2) { + if (typeof url2 === "string") { + url2 = new URL(url2); + if (!/^https?:/.test(url2.origin || url2.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - return url; + return url2; } - if (!url || typeof url !== "object") { + if (!url2 || typeof url2 !== "object") { throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); } - if (!/^https?:/.test(url.origin || url.protocol)) { + if (!/^https?:/.test(url2.origin || url2.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - if (!(url instanceof URL)) { - if (url.port != null && url.port !== "" && !Number.isFinite(parseInt(url.port))) { + if (!(url2 instanceof URL)) { + if (url2.port != null && url2.port !== "" && !Number.isFinite(parseInt(url2.port))) { throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); } - if (url.path != null && typeof url.path !== "string") { + if (url2.path != null && typeof url2.path !== "string") { throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); } - if (url.pathname != null && typeof url.pathname !== "string") { + if (url2.pathname != null && typeof url2.pathname !== "string") { throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); } - if (url.hostname != null && typeof url.hostname !== "string") { + if (url2.hostname != null && typeof url2.hostname !== "string") { throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); } - if (url.origin != null && typeof url.origin !== "string") { + if (url2.origin != null && typeof url2.origin !== "string") { throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); } - const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; - let origin = url.origin != null ? url.origin : `${url.protocol}//${url.hostname}:${port}`; - let path12 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + const port = url2.port != null ? url2.port : url2.protocol === "https:" ? 443 : 80; + let origin = url2.origin != null ? url2.origin : `${url2.protocol}//${url2.hostname}:${port}`; + let path12 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; if (origin.endsWith("/")) { origin = origin.substring(0, origin.length - 1); } if (path12 && !path12.startsWith("/")) { path12 = `/${path12}`; } - url = new URL(origin + path12); + url2 = new URL(origin + path12); } - return url; + return url2; } - function parseOrigin(url) { - url = parseURL(url); - if (url.pathname !== "/" || url.search || url.hash) { + function parseOrigin(url2) { + url2 = parseURL(url2); + if (url2.pathname !== "/" || url2.search || url2.hash) { throw new InvalidArgumentError("invalid url"); } - return url; + return url2; } function getHostname(host) { if (host[0] === "[") { @@ -3666,8 +3666,8 @@ var require_util2 = __commonJS({ return request.urlList[request.urlList.length - 1]; } function requestBadPort(request) { - const url = requestCurrentURL(request); - if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { + const url2 = requestCurrentURL(request); + if (urlIsHttpHttpsScheme(url2) && badPortsSet.has(url2.port)) { return "blocked"; } return "allowed"; @@ -3881,30 +3881,30 @@ var require_util2 = __commonJS({ return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; } } - function stripURLForReferrer(url, originOnly) { - assert(url instanceof URL); - if (url.protocol === "file:" || url.protocol === "about:" || url.protocol === "blank:") { + function stripURLForReferrer(url2, originOnly) { + assert(url2 instanceof URL); + if (url2.protocol === "file:" || url2.protocol === "about:" || url2.protocol === "blank:") { return "no-referrer"; } - url.username = ""; - url.password = ""; - url.hash = ""; + url2.username = ""; + url2.password = ""; + url2.hash = ""; if (originOnly) { - url.pathname = ""; - url.search = ""; + url2.pathname = ""; + url2.search = ""; } - return url; + return url2; } - function isURLPotentiallyTrustworthy(url) { - if (!(url instanceof URL)) { + function isURLPotentiallyTrustworthy(url2) { + if (!(url2 instanceof URL)) { return false; } - if (url.href === "about:blank" || url.href === "about:srcdoc") { + if (url2.href === "about:blank" || url2.href === "about:srcdoc") { return true; } - if (url.protocol === "data:") return true; - if (url.protocol === "file:") return true; - return isOriginPotentiallyTrustworthy(url.origin); + if (url2.protocol === "data:") return true; + if (url2.protocol === "file:") return true; + return isOriginPotentiallyTrustworthy(url2.origin); function isOriginPotentiallyTrustworthy(origin) { if (origin == null || origin === "null") return false; const originAsURL = new URL(origin); @@ -4174,20 +4174,20 @@ var require_util2 = __commonJS({ byteLength += chunk.length; } } - function urlIsLocal(url) { - assert("protocol" in url); - const protocol = url.protocol; + function urlIsLocal(url2) { + assert("protocol" in url2); + const protocol = url2.protocol; return protocol === "about:" || protocol === "blob:" || protocol === "data:"; } - function urlHasHttpsScheme(url) { - if (typeof url === "string") { - return url.startsWith("https:"); + function urlHasHttpsScheme(url2) { + if (typeof url2 === "string") { + return url2.startsWith("https:"); } - return url.protocol === "https:"; + return url2.protocol === "https:"; } - function urlIsHttpHttpsScheme(url) { - assert("protocol" in url); - const protocol = url.protocol; + function urlIsHttpHttpsScheme(url2) { + assert("protocol" in url2); + const protocol = url2.protocol; return protocol === "http:" || protocol === "https:"; } var hasOwn = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)); @@ -4672,12 +4672,12 @@ var require_dataURL = __commonJS({ } return { mimeType: mimeTypeRecord, body }; } - function URLSerializer(url, excludeFragment = false) { + function URLSerializer(url2, excludeFragment = false) { if (!excludeFragment) { - return url.href; + return url2.href; } - const href = url.href; - const hashLength = url.hash.length; + const href = url2.href; + const hashLength = url2.hash.length; return hashLength === 0 ? href : href.substring(0, href.length - hashLength); } function collectASequenceOfCodePoints(condition, input, position) { @@ -6984,7 +6984,7 @@ var require_client = __commonJS({ * @param {string|URL} url * @param {import('../types/client').Client.Options} options */ - constructor(url, { + constructor(url2, { interceptors, maxHeaderSize, headersTimeout, @@ -7090,7 +7090,7 @@ var require_client = __commonJS({ }); } this[kInterceptors] = interceptors && interceptors.Client && Array.isArray(interceptors.Client) ? interceptors.Client : [createRedirectInterceptor({ maxRedirections })]; - this[kUrl] = util.parseOrigin(url); + this[kUrl] = util.parseOrigin(url2); this[kConnector] = connect2; this[kSocket] = null; this[kPipelining] = pipelining != null ? pipelining : 1; @@ -10556,10 +10556,10 @@ var require_mock_utils = __commonJS({ }; } function checkNetConnect(netConnect, origin) { - const url = new URL(origin); + const url2 = new URL(origin); if (netConnect === true) { return true; - } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) { + } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url2.host))) { return true; } return false; @@ -12001,16 +12001,16 @@ var require_response = __commonJS({ return responseObject; } // Creates a redirect Response that redirects to url with status status. - static redirect(url, status = 302) { + static redirect(url2, status = 302) { const relevantRealm = { settingsObject: {} }; webidl.argumentLengthCheck(arguments, 1, { header: "Response.redirect" }); - url = webidl.converters.USVString(url); + url2 = webidl.converters.USVString(url2); status = webidl.converters["unsigned short"](status); let parsedURL; try { - parsedURL = new URL(url, getGlobalOrigin()); + parsedURL = new URL(url2, getGlobalOrigin()); } catch (err) { - throw Object.assign(new TypeError("Failed to parse URL from " + url), { + throw Object.assign(new TypeError("Failed to parse URL from " + url2), { cause: err }); } @@ -12054,11 +12054,11 @@ var require_response = __commonJS({ get url() { webidl.brandCheck(this, _Response); const urlList = this[kState].urlList; - const url = urlList[urlList.length - 1] ?? null; - if (url === null) { + const url2 = urlList[urlList.length - 1] ?? null; + if (url2 === null) { return ""; } - return URLSerializer(url, true); + return URLSerializer(url2, true); } // Returns whether response was obtained through a redirect. get redirected() { @@ -13850,12 +13850,12 @@ var require_fetch = __commonJS({ } return response; async function dispatch({ body }) { - const url = requestCurrentURL(request); + const url2 = requestCurrentURL(request); const agent = fetchParams.controller.dispatcher; return new Promise((resolve6, reject) => agent.dispatch( { - path: url.pathname + url.search, - origin: url.origin, + path: url2.pathname + url2.search, + origin: url2.origin, method: request.method, body: fetchParams.controller.dispatcher.isMockActive ? request.body && (request.body.source || request.body.stream) : body, headers: request.headersList.entries, @@ -16335,9 +16335,9 @@ var require_connection = __commonJS({ crypto = require("crypto"); } catch { } - function establishWebSocketConnection(url, protocols, ws, onEstablish, options) { - const requestURL = url; - requestURL.protocol = url.protocol === "ws:" ? "http:" : "https:"; + function establishWebSocketConnection(url2, protocols, ws, onEstablish, options) { + const requestURL = url2; + requestURL.protocol = url2.protocol === "ws:" ? "http:" : "https:"; const request = makeRequest({ urlList: [requestURL], serviceWorkers: "none", @@ -16788,7 +16788,7 @@ var require_websocket = __commonJS({ * @param {string} url * @param {string|string[]} protocols */ - constructor(url, protocols = []) { + constructor(url2, protocols = []) { super(); webidl.argumentLengthCheck(arguments, 1, { header: "WebSocket constructor" }); if (!experimentalWarned) { @@ -16798,12 +16798,12 @@ var require_websocket = __commonJS({ }); } const options = webidl.converters["DOMString or sequence or WebSocketInit"](protocols); - url = webidl.converters.USVString(url); + url2 = webidl.converters.USVString(url2); protocols = options.protocols; const baseURL = getGlobalOrigin(); let urlRecord; try { - urlRecord = new URL(url, baseURL); + urlRecord = new URL(url2, baseURL); } catch (e) { throw new DOMException2(e, "SyntaxError"); } @@ -17198,12 +17198,12 @@ var require_undici = __commonJS({ module2.exports.buildConnector = buildConnector; module2.exports.errors = errors; function makeDispatcher(fn) { - return (url, opts, handler) => { + return (url2, opts, handler) => { if (typeof opts === "function") { handler = opts; opts = null; } - if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) { + if (!url2 || typeof url2 !== "string" && typeof url2 !== "object" && !(url2 instanceof URL)) { throw new InvalidArgumentError("invalid url"); } if (opts != null && typeof opts !== "object") { @@ -17217,12 +17217,12 @@ var require_undici = __commonJS({ if (!opts.path.startsWith("/")) { path12 = `/${path12}`; } - url = new URL(util.parseOrigin(url).origin + path12); + url2 = new URL(util.parseOrigin(url2).origin + path12); } else { if (!opts) { - opts = typeof url === "object" ? url : {}; + opts = typeof url2 === "object" ? url2 : {}; } - url = util.parseURL(url); + url2 = util.parseURL(url2); } const { agent, dispatcher = getGlobalDispatcher() } = opts; if (agent) { @@ -17230,8 +17230,8 @@ var require_undici = __commonJS({ } return fn.call(dispatcher, { ...opts, - origin: url.origin, - path: url.search ? `${url.pathname}${url.search}` : url.pathname, + origin: url2.origin, + path: url2.search ? `${url2.pathname}${url2.search}` : url2.pathname, method: opts.method || (opts.body ? "PUT" : "GET") }, handler); }; @@ -19957,8 +19957,8 @@ var require_utils3 = __commonJS({ exports2.getProxyAgentDispatcher = getProxyAgentDispatcher; function getProxyFetch(destinationUrl) { const httpDispatcher = getProxyAgentDispatcher(destinationUrl); - const proxyFetch = (url, opts) => __awaiter4(this, void 0, void 0, function* () { - return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); + const proxyFetch = (url2, opts) => __awaiter4(this, void 0, void 0, function* () { + return (0, undici_1.fetch)(url2, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); }); return proxyFetch; } @@ -20215,8 +20215,8 @@ var require_dist_node2 = __commonJS({ } function merge2(defaults, route, options) { if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { method, url } : { url: method }, options); + let [method, url2] = route.split(" "); + options = Object.assign(url2 ? { method, url: url2 } : { url: method }, options); } else { options = Object.assign({}, route); } @@ -20234,13 +20234,13 @@ var require_dist_node2 = __commonJS({ } return mergedOptions; } - function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; + function addQueryParameters(url2, parameters) { + const separator = /\?/.test(url2) ? "&" : "?"; const names = Object.keys(parameters); if (names.length === 0) { - return url; + return url2; } - return url + separator + names.map((name) => { + return url2 + separator + names.map((name) => { if (name === "q") { return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); } @@ -20251,8 +20251,8 @@ var require_dist_node2 = __commonJS({ function removeNonChars(variableName) { return variableName.replace(/(?:^\W+)|(?:(? urlVariableNames.includes(option)).concat("baseUrl"); const remainingParameters = omit(parameters, omittedParameters); @@ -20427,7 +20427,7 @@ var require_dist_node2 = __commonJS({ ) ).join(","); } - if (url.endsWith("/graphql")) { + if (url2.endsWith("/graphql")) { if (options.mediaType.previews?.length) { const previewsFromAcceptHeader = headers.accept.match(/(? { @@ -20438,7 +20438,7 @@ var require_dist_node2 = __commonJS({ } } if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); + url2 = addQueryParameters(url2, remainingParameters); } else { if ("data" in remainingParameters) { body = remainingParameters.data; @@ -20455,7 +20455,7 @@ var require_dist_node2 = __commonJS({ body = ""; } return Object.assign( - { method, url, headers }, + { method, url: url2, headers }, typeof body !== "undefined" ? { body } : null, options.request ? { request: options.request } : null ); @@ -20714,7 +20714,7 @@ var require_dist_node5 = __commonJS({ } let headers = {}; let status; - let url; + let url2; let { fetch } = globalThis; if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { fetch = requestOptions.request.fetch; @@ -20734,7 +20734,7 @@ var require_dist_node5 = __commonJS({ // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. ...requestOptions.body && { duplex: "half" } }).then(async (response) => { - url = response.url; + url2 = response.url; status = response.status; for (const keyAndValue of response.headers) { headers[keyAndValue[0]] = keyAndValue[1]; @@ -20755,7 +20755,7 @@ var require_dist_node5 = __commonJS({ } throw new import_request_error.RequestError(response.statusText, status, { response: { - url, + url: url2, status, headers, data: void 0 @@ -20766,7 +20766,7 @@ var require_dist_node5 = __commonJS({ if (status === 304) { throw new import_request_error.RequestError("Not modified", status, { response: { - url, + url: url2, status, headers, data: await getResponseData(response) @@ -20778,7 +20778,7 @@ var require_dist_node5 = __commonJS({ const data = await getResponseData(response); const error2 = new import_request_error.RequestError(toErrorMessage(data), status, { response: { - url, + url: url2, status, headers, data @@ -20791,7 +20791,7 @@ var require_dist_node5 = __commonJS({ }).then((data) => { return { status, - url, + url: url2, headers, data }; @@ -20955,8 +20955,8 @@ var require_dist_node6 = __commonJS({ } function merge2(defaults, route, options) { if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { method, url } : { url: method }, options); + let [method, url2] = route.split(" "); + options = Object.assign(url2 ? { method, url: url2 } : { url: method }, options); } else { options = Object.assign({}, route); } @@ -20974,13 +20974,13 @@ var require_dist_node6 = __commonJS({ } return mergedOptions; } - function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; + function addQueryParameters(url2, parameters) { + const separator = /\?/.test(url2) ? "&" : "?"; const names = Object.keys(parameters); if (names.length === 0) { - return url; + return url2; } - return url + separator + names.map((name) => { + return url2 + separator + names.map((name) => { if (name === "q") { return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); } @@ -20991,8 +20991,8 @@ var require_dist_node6 = __commonJS({ function removeNonChars(variableName) { return variableName.replace(/(?:^\W+)|(?:(? urlVariableNames.includes(option)).concat("baseUrl"); const remainingParameters = omit(parameters, omittedParameters); @@ -21167,7 +21167,7 @@ var require_dist_node6 = __commonJS({ ) ).join(","); } - if (url.endsWith("/graphql")) { + if (url2.endsWith("/graphql")) { if (options.mediaType.previews?.length) { const previewsFromAcceptHeader = headers.accept.match(/(? { @@ -21178,7 +21178,7 @@ var require_dist_node6 = __commonJS({ } } if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); + url2 = addQueryParameters(url2, remainingParameters); } else { if ("data" in remainingParameters) { body = remainingParameters.data; @@ -21195,7 +21195,7 @@ var require_dist_node6 = __commonJS({ body = ""; } return Object.assign( - { method, url, headers }, + { method, url: url2, headers }, typeof body !== "undefined" ? { body } : null, options.request ? { request: options.request } : null ); @@ -21362,7 +21362,7 @@ var require_dist_node8 = __commonJS({ } let headers = {}; let status; - let url; + let url2; let { fetch } = globalThis; if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { fetch = requestOptions.request.fetch; @@ -21382,7 +21382,7 @@ var require_dist_node8 = __commonJS({ // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. ...requestOptions.body && { duplex: "half" } }).then(async (response) => { - url = response.url; + url2 = response.url; status = response.status; for (const keyAndValue of response.headers) { headers[keyAndValue[0]] = keyAndValue[1]; @@ -21403,7 +21403,7 @@ var require_dist_node8 = __commonJS({ } throw new import_request_error.RequestError(response.statusText, status, { response: { - url, + url: url2, status, headers, data: void 0 @@ -21414,7 +21414,7 @@ var require_dist_node8 = __commonJS({ if (status === 304) { throw new import_request_error.RequestError("Not modified", status, { response: { - url, + url: url2, status, headers, data: await getResponseData(response) @@ -21426,7 +21426,7 @@ var require_dist_node8 = __commonJS({ const data = await getResponseData(response); const error2 = new import_request_error.RequestError(toErrorMessage(data), status, { response: { - url, + url: url2, status, headers, data @@ -21439,7 +21439,7 @@ var require_dist_node8 = __commonJS({ }).then((data) => { return { status, - url, + url: url2, headers, data }; @@ -23907,11 +23907,11 @@ var require_dist_node12 = __commonJS({ for (const [scope, endpoints] of Object.entries(endpoints_default)) { for (const [methodName, endpoint] of Object.entries(endpoints)) { const [route, defaults, decorations] = endpoint; - const [method, url] = route.split(/ /); + const [method, url2] = route.split(/ /); const endpointDefaults = Object.assign( { method, - url + url: url2 }, defaults ); @@ -24105,23 +24105,23 @@ var require_dist_node13 = __commonJS({ const requestMethod = typeof route === "function" ? route : octokit.request; const method = options.method; const headers = options.headers; - let url = options.url; + let url2 = options.url; return { [Symbol.asyncIterator]: () => ({ async next() { - if (!url) + if (!url2) return { done: true }; try { - const response = await requestMethod({ method, url, headers }); + const response = await requestMethod({ method, url: url2, headers }); const normalizedResponse = normalizePaginatedListResponse(response); - url = ((normalizedResponse.headers.link || "").match( + url2 = ((normalizedResponse.headers.link || "").match( /<([^<>]+)>;\s*rel="next"/ ) || [])[1]; return { value: normalizedResponse }; } catch (error2) { if (error2.status !== 409) throw error2; - url = ""; + url2 = ""; return { value: { status: 200, @@ -36289,7 +36289,6 @@ var require_package = __commonJS({ "console-log-level": "^1.4.1", del: "^6.1.1", "fast-deep-equal": "^3.1.3", - "file-url": "^3.0.0", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", @@ -41100,16 +41099,16 @@ var require_sanitizer = __commonJS({ if (typeof value !== "string" || value === null || value === "") { return value; } - const url = new URL(value); - if (!url.search) { + const url2 = new URL(value); + if (!url2.search) { return value; } - for (const [key] of url.searchParams) { + for (const [key] of url2.searchParams) { if (!this.allowedQueryParameters.has(key.toLowerCase())) { - url.searchParams.set(key, RedactedString); + url2.searchParams.set(key, RedactedString); } } - return url.toString(); + return url2.toString(); } sanitizeHeaders(obj) { const sanitized = {}; @@ -41198,8 +41197,8 @@ var require_redirectPolicy = __commonJS({ const { request, status, headers } = response; const locationHeader = headers.get("location"); if (locationHeader && (status === 300 || status === 301 && allowedRedirect.includes(request.method) || status === 302 && allowedRedirect.includes(request.method) || status === 303 && request.method === "POST" || status === 307) && currentRetries < maxRetries) { - const url = new URL(locationHeader, request.url); - request.url = url.toString(); + const url2 = new URL(locationHeader, request.url); + request.url = url2.toString(); if (status === 303) { request.method = "GET"; request.headers.delete("Content-Length"); @@ -43403,9 +43402,9 @@ var require_helpers2 = __commonJS({ } } exports2.json = json2; - function req(url, opts = {}) { - const href = typeof url === "string" ? url : url.href; - const req2 = (href.startsWith("https:") ? https2 : http).request(url, opts); + function req(url2, opts = {}) { + const href = typeof url2 === "string" ? url2 : url2.href; + const req2 = (href.startsWith("https:") ? https2 : http).request(url2, opts); const promise = new Promise((resolve6, reject) => { req2.once("response", resolve6).once("error", reject).end(); }); @@ -43885,11 +43884,11 @@ var require_dist4 = __commonJS({ const protocol = opts.secureEndpoint ? "https:" : "http:"; const hostname = req.getHeader("host") || "localhost"; const base = `${protocol}//${hostname}`; - const url = new url_1.URL(req.path, base); + const url2 = new url_1.URL(req.path, base); if (opts.port !== 80) { - url.port = String(opts.port); + url2.port = String(opts.port); } - req.path = String(url); + req.path = String(url2); const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders }; if (proxy.username || proxy.password) { const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; @@ -44060,8 +44059,8 @@ var require_proxyPolicy = __commonJS({ if (request.agent) { return; } - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; + const url2 = new URL(request.url); + const isInsecure = url2.protocol !== "https:"; if (request.tlsSettings) { log_js_1.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored."); } @@ -44708,17 +44707,17 @@ var require_nodeHttpClient = __commonJS({ } makeRequest(request, abortController, body) { var _a; - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; + const url2 = new URL(request.url); + const isInsecure = url2.protocol !== "https:"; if (isInsecure && !request.allowInsecureConnection) { throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); } const agent = (_a = request.agent) !== null && _a !== void 0 ? _a : this.getOrCreateAgent(request, isInsecure); const options = { agent, - hostname: url.hostname, - path: `${url.pathname}${url.search}`, - port: url.port, + hostname: url2.hostname, + path: `${url2.pathname}${url2.search}`, + port: url2.port, method: request.method, headers: request.headers.toJSON({ preserveCase: true }) }; @@ -48097,14 +48096,14 @@ var require_urlHelpers = __commonJS({ } return result; } - function isAbsoluteUrl(url) { - return url.includes("://"); + function isAbsoluteUrl(url2) { + return url2.includes("://"); } - function appendPath(url, pathToAppend) { + function appendPath(url2, pathToAppend) { if (!pathToAppend) { - return url; + return url2; } - const parsedUrl = new URL(url); + const parsedUrl = new URL(url2); let newPath = parsedUrl.pathname; if (!newPath.endsWith("/")) { newPath = `${newPath}/`; @@ -48195,11 +48194,11 @@ var require_urlHelpers = __commonJS({ } return result; } - function appendQueryParams(url, queryParams, sequenceParams, noOverwrite = false) { + function appendQueryParams(url2, queryParams, sequenceParams, noOverwrite = false) { if (queryParams.size === 0) { - return url; + return url2; } - const parsedUrl = new URL(url); + const parsedUrl = new URL(url2); const combinedParams = simpleParseQueryParams(parsedUrl.search); for (const [name, value] of queryParams) { const existingValue = combinedParams.get(name); @@ -48310,9 +48309,9 @@ var require_serviceClient = __commonJS({ if (!endpoint) { throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use."); } - const url = (0, urlHelpers_js_1.getRequestUrl)(endpoint, operationSpec, operationArguments, this); + const url2 = (0, urlHelpers_js_1.getRequestUrl)(endpoint, operationSpec, operationArguments, this); const request = (0, core_rest_pipeline_1.createPipelineRequest)({ - url + url: url2 }); request.method = operationSpec.httpMethod; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); @@ -52263,8 +52262,8 @@ var require_dist7 = __commonJS({ "11103", "11104" ]; - function escapeURLPath(url2) { - const urlParsed = new URL(url2); + function escapeURLPath(url3) { + const urlParsed = new URL(url3); let path12 = urlParsed.pathname; path12 = path12 || "/"; path12 = escape(path12); @@ -52351,15 +52350,15 @@ var require_dist7 = __commonJS({ function escape(text) { return encodeURIComponent(text).replace(/%2F/g, "/").replace(/'/g, "%27").replace(/\+/g, "%20").replace(/%25/g, "%"); } - function appendToURLPath(url2, name) { - const urlParsed = new URL(url2); + function appendToURLPath(url3, name) { + const urlParsed = new URL(url3); let path12 = urlParsed.pathname; path12 = path12 ? path12.endsWith("/") ? `${path12}${name}` : `${path12}/${name}` : name; urlParsed.pathname = path12; return urlParsed.toString(); } - function setURLParameter(url2, name, value) { - const urlParsed = new URL(url2); + function setURLParameter(url3, name, value) { + const urlParsed = new URL(url3); const encodedName = encodeURIComponent(name); const encodedValue = value ? encodeURIComponent(value) : void 0; const searchString = urlParsed.search === "" ? "?" : urlParsed.search; @@ -52378,34 +52377,34 @@ var require_dist7 = __commonJS({ urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return urlParsed.toString(); } - function getURLParameter(url2, name) { + function getURLParameter(url3, name) { var _a; - const urlParsed = new URL(url2); + const urlParsed = new URL(url3); return (_a = urlParsed.searchParams.get(name)) !== null && _a !== void 0 ? _a : void 0; } - function setURLHost(url2, host) { - const urlParsed = new URL(url2); + function setURLHost(url3, host) { + const urlParsed = new URL(url3); urlParsed.hostname = host; return urlParsed.toString(); } - function getURLPath(url2) { + function getURLPath(url3) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url3); return urlParsed.pathname; } catch (e) { return void 0; } } - function getURLScheme(url2) { + function getURLScheme(url3) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url3); return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; } catch (e) { return void 0; } } - function getURLPathAndQuery(url2) { - const urlParsed = new URL(url2); + function getURLPathAndQuery(url3) { + const urlParsed = new URL(url3); const pathString = urlParsed.pathname; if (!pathString) { throw new RangeError("Invalid url without valid path."); @@ -52417,8 +52416,8 @@ var require_dist7 = __commonJS({ } return `${pathString}${queryString}`; } - function getURLQueries(url2) { - let queryString = new URL(url2).search; + function getURLQueries(url3) { + let queryString = new URL(url3).search; if (!queryString) { return {}; } @@ -52439,8 +52438,8 @@ var require_dist7 = __commonJS({ } return queries; } - function appendToURLQuery(url2, queryParts) { - const urlParsed = new URL(url2); + function appendToURLQuery(url3, queryParts) { + const urlParsed = new URL(url3); let query = urlParsed.search; if (query) { query += "&" + queryParts; @@ -52506,8 +52505,8 @@ var require_dist7 = __commonJS({ function iEqual(str1, str2) { return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } - function getAccountNameFromUrl(url2) { - const parsedUrl = new URL(url2); + function getAccountNameFromUrl(url3) { + const parsedUrl = new URL(url3); let accountName; try { if (parsedUrl.hostname.split(".")[1] === "blob") { @@ -62445,7 +62444,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var url = { + var url2 = { parameterPath: "url", mapper: { serializedName: "url", @@ -64121,7 +64120,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp, timeoutInSeconds ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -64151,7 +64150,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp, timeoutInSeconds ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64178,7 +64177,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, comp1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64208,7 +64207,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; maxPageSize, include ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64236,7 +64235,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, comp3 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -64265,7 +64264,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, restype1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64292,7 +64291,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body, queryParameters: [timeoutInSeconds, comp4], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ accept, version, @@ -64325,7 +64324,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp5, where ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64513,7 +64512,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64539,7 +64538,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64562,7 +64561,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64591,7 +64590,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp6 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64632,7 +64631,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp7 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64660,7 +64659,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp7 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -64693,7 +64692,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp8 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64721,7 +64720,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp9 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64754,7 +64753,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp4, restype2 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ accept, version, @@ -64788,7 +64787,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; where, restype2 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64814,7 +64813,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64845,7 +64844,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64875,7 +64874,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64905,7 +64904,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64935,7 +64934,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64971,7 +64970,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, include1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65003,7 +65002,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; include1, delimiter ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65029,7 +65028,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, restype1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65293,7 +65292,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, versionId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65331,7 +65330,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, versionId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65367,7 +65366,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, blobDeleteType ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65396,7 +65395,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp8], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65418,7 +65417,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp11], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65442,7 +65441,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65476,7 +65475,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65501,7 +65500,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65523,7 +65522,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp13], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65546,7 +65545,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp6], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65579,7 +65578,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65609,7 +65608,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65638,7 +65637,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65667,7 +65666,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65697,7 +65696,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65726,7 +65725,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp14], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65759,7 +65758,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65801,7 +65800,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65849,7 +65848,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp15, copyId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65881,7 +65880,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, comp16 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65911,7 +65910,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, restype1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65949,7 +65948,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, comp17 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -65989,7 +65988,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, comp18 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66018,7 +66017,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, comp18 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -66152,7 +66151,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66201,7 +66200,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body1, queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66244,7 +66243,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66282,7 +66281,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66336,7 +66335,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, comp20 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66373,7 +66372,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp20, prevsnapshot ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66403,7 +66402,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66436,7 +66435,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66466,7 +66465,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp21], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66547,7 +66546,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66593,7 +66592,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body1, queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66633,7 +66632,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66678,7 +66677,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp23], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66798,7 +66797,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body1, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66849,7 +66848,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66908,7 +66907,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp24, blockId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66945,7 +66944,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp24, blockId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66983,7 +66982,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: blocks, queryParameters: [timeoutInSeconds, comp25], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -67038,7 +67037,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp25, listType ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67056,9 +67055,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * operation. * @param options The parameter options */ - constructor(url2, options) { + constructor(url3, options) { var _a, _b; - if (url2 === void 0) { + if (url3 === void 0) { throw new Error("'url' cannot be null"); } if (!options) { @@ -67073,7 +67072,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; userAgentPrefix }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{url}" }); super(optionsWithDefaults); - this.url = url2; + this.url = url3; this.version = options.version || "2024-11-04"; this.service = new ServiceImpl(this); this.container = new ContainerImpl(this); @@ -67098,9 +67097,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param url - url to resource * @param pipeline - request policy pipeline. */ - constructor(url2, pipeline) { - this.url = escapeURLPath(url2); - this.accountName = getAccountNameFromUrl(url2); + constructor(url3, pipeline) { + this.url = escapeURLPath(url3); + this.accountName = getAccountNameFromUrl(url3); this.pipeline = pipeline; this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline)); this.isHttps = iEqual(getURLScheme(this.url) || "", "https"); @@ -70358,16 +70357,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { options = options || {}; let pipeline; - let url2; + let url3; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } @@ -70379,7 +70378,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -70388,7 +70387,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -70396,7 +70395,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); ({ blobName: this._name, containerName: this._containerName } = this.getBlobAndContainerNamesFromUrl()); this.blobContext = this.storageClientContext.blob; this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT); @@ -71244,17 +71243,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; var AppendBlobClient = class _AppendBlobClient extends BlobClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(new AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; @@ -71263,7 +71262,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -71272,7 +71271,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -71280,7 +71279,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); this.appendBlobContext = this.storageClientContext.appendBlob; } /** @@ -71459,17 +71458,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; var BlockBlobClient = class _BlockBlobClient extends BlobClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } @@ -71481,7 +71480,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -71490,7 +71489,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -71498,7 +71497,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); this.blockBlobContext = this.storageClientContext.blockBlob; this._blobContext = this.storageClientContext.blob; } @@ -72006,17 +72005,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; var PageBlobClient = class _PageBlobClient extends BlobClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(new AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; @@ -72025,7 +72024,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -72034,7 +72033,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -72042,7 +72041,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); this.pageBlobContext = this.storageClientContext.pageBlob; } /** @@ -72913,13 +72912,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { - let url2; + let url3; let credential; if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrOptions instanceof StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrOptions))) { - url2 = urlOrBlobClient; + url3 = urlOrBlobClient; credential = credentialOrOptions; } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + url3 = urlOrBlobClient.url; credential = urlOrBlobClient.credential; options = credentialOrOptions; } else { @@ -72931,23 +72930,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("delete"); await this.addSubRequestInternal({ - url: url2, + url: url3, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).delete(updatedOptions); + await new BlobClient(url3, this.batchRequest.createPipeline(credential)).delete(updatedOptions); }); }); } async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { - let url2; + let url3; let credential; let tier2; if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrTier instanceof StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrTier))) { - url2 = urlOrBlobClient; + url3 = urlOrBlobClient; credential = credentialOrTier; tier2 = tierOrOptions; } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + url3 = urlOrBlobClient.url; credential = urlOrBlobClient.credential; tier2 = credentialOrTier; options = tierOrOptions; @@ -72960,10 +72959,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("setAccessTier"); await this.addSubRequestInternal({ - url: url2, + url: url3, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); + await new BlobClient(url3, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); }); }); } @@ -73086,7 +73085,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } var BlobBatchClient = class { - constructor(url2, credentialOrPipeline, options) { + constructor(url3, credentialOrPipeline, options) { let pipeline; if (isPipelineLike(credentialOrPipeline)) { pipeline = credentialOrPipeline; @@ -73095,8 +73094,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { pipeline = newPipeline(credentialOrPipeline, options); } - const storageClientContext = new StorageContextClient(url2, getCoreClientOptions(pipeline)); - const path12 = getURLPath(url2); + const storageClientContext = new StorageContextClient(url3, getCoreClientOptions(pipeline)); + const path12 = getURLPath(url3); if (path12 && path12 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { @@ -73200,16 +73199,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(new AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string") { const containerName = credentialOrPipelineOrContainerName; @@ -73217,7 +73216,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); + url3 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -73226,7 +73225,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -73234,7 +73233,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName parameter"); } - super(url2, pipeline); + super(url3, pipeline); this._containerName = this.getContainerNameFromUrl(); this.containerContext = this.storageClientContext.container; } @@ -74683,7 +74682,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } - constructor(url2, credentialOrPipeline, options) { + constructor(url3, credentialOrPipeline, options) { let pipeline; if (isPipelineLike(credentialOrPipeline)) { pipeline = credentialOrPipeline; @@ -74692,7 +74691,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { pipeline = newPipeline(new AnonymousCredential(), options); } - super(url2, pipeline); + super(url3, pipeline); this.serviceContext = this.storageClientContext.service; } /** @@ -76454,9 +76453,9 @@ var require_cacheHttpClient = __commonJS({ if (!baseUrl) { throw new Error("Cache Service Url not found, unable to restore cache."); } - const url = `${baseUrl}_apis/artifactcache/${resource}`; - core14.debug(`Resource Url: ${url}`); - return url; + const url2 = `${baseUrl}_apis/artifactcache/${resource}`; + core14.debug(`Resource Url: ${url2}`); + return url2; } function createAcceptHeader(type2, apiVersion) { return `${type2};api-version=${apiVersion}`; @@ -81550,18 +81549,18 @@ var require_util10 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.maskSecretUrls = exports2.maskSigUrl = void 0; var core_1 = require_core(); - function maskSigUrl(url) { - if (!url) + function maskSigUrl(url2) { + if (!url2) return; try { - const parsedUrl = new URL(url); + const parsedUrl = new URL(url2); const signature = parsedUrl.searchParams.get("sig"); if (signature) { (0, core_1.setSecret)(signature); (0, core_1.setSecret)(encodeURIComponent(signature)); } } catch (error2) { - (0, core_1.debug)(`Failed to parse URL: ${url} ${error2 instanceof Error ? error2.message : String(error2)}`); + (0, core_1.debug)(`Failed to parse URL: ${url2} ${error2 instanceof Error ? error2.message : String(error2)}`); } } exports2.maskSigUrl = maskSigUrl; @@ -81647,14 +81646,14 @@ var require_cacheTwirpClient = __commonJS({ // JSON generated client. request(service, method, contentType, data) { return __awaiter4(this, void 0, void 0, function* () { - const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; - (0, core_1.debug)(`[Request] ${method} ${url}`); + const url2 = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; + (0, core_1.debug)(`[Request] ${method} ${url2}`); const headers = { "Content-Type": contentType }; try { const { body } = yield this.retryableRequest(() => __awaiter4(this, void 0, void 0, function* () { - return this.httpClient.post(url, JSON.stringify(data), headers); + return this.httpClient.post(url2, JSON.stringify(data), headers); })); return body; } catch (error2) { @@ -82417,32 +82416,6 @@ var require_cache3 = __commonJS({ } }); -// node_modules/file-url/index.js -var require_file_url = __commonJS({ - "node_modules/file-url/index.js"(exports2, module2) { - "use strict"; - var path12 = require("path"); - module2.exports = (filePath, options) => { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - options = { - resolve: true, - ...options - }; - let pathName = filePath; - if (options.resolve) { - pathName = path12.resolve(filePath); - } - pathName = pathName.replace(/\\/g, "/"); - if (pathName[0] !== "/") { - pathName = `/${pathName}`; - } - return encodeURI(`file://${pathName}`).replace(/[?#]/g, encodeURIComponent); - }; - } -}); - // node_modules/jsonschema/lib/helpers.js var require_helpers3 = __commonJS({ "node_modules/jsonschema/lib/helpers.js"(exports2, module2) { @@ -84070,18 +84043,18 @@ var require_tool_cache = __commonJS({ var IS_WINDOWS = process.platform === "win32"; var IS_MAC = process.platform === "darwin"; var userAgent = "actions/tool-cache"; - function downloadTool2(url, dest, auth, headers) { + function downloadTool2(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { dest = dest || path12.join(_getTempDirectory(), crypto.randomUUID()); yield io6.mkdirP(path12.dirname(dest)); - core14.debug(`Downloading ${url}`); + core14.debug(`Downloading ${url2}`); core14.debug(`Destination ${dest}`); const maxAttempts = 3; const minSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS", 10); const maxSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS", 20); const retryHelper = new retry_helper_1.RetryHelper(maxAttempts, minSeconds, maxSeconds); return yield retryHelper.execute(() => __awaiter4(this, void 0, void 0, function* () { - return yield downloadToolAttempt(url, dest || "", auth, headers); + return yield downloadToolAttempt(url2, dest || "", auth, headers); }), (err) => { if (err instanceof HTTPError && err.httpStatusCode) { if (err.httpStatusCode < 500 && err.httpStatusCode !== 408 && err.httpStatusCode !== 429) { @@ -84093,7 +84066,7 @@ var require_tool_cache = __commonJS({ }); } exports2.downloadTool = downloadTool2; - function downloadToolAttempt(url, dest, auth, headers) { + function downloadToolAttempt(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { if (fs13.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); @@ -84108,10 +84081,10 @@ var require_tool_cache = __commonJS({ } headers.authorization = auth; } - const response = yield http.get(url, headers); + const response = yield http.get(url2, headers); if (response.message.statusCode !== 200) { const err = new HTTPError(response.message.statusCode); - core14.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); + core14.debug(`Failed to download from "${url2}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); throw err; } const pipeline = util.promisify(stream2.pipeline); @@ -84587,8 +84560,8 @@ var require_debug2 = __commonJS({ // node_modules/follow-redirects/index.js var require_follow_redirects = __commonJS({ "node_modules/follow-redirects/index.js"(exports2, module2) { - var url = require("url"); - var URL2 = url.URL; + var url2 = require("url"); + var URL2 = url2.URL; var http = require("http"); var https2 = require("https"); var Writable = require("stream").Writable; @@ -84840,7 +84813,7 @@ var require_follow_redirects = __commonJS({ for (var event of events) { request.on(event, eventHandlers[event]); } - this._currentUrl = /^\//.test(this._options.path) ? url.format(this._options) : ( + this._currentUrl = /^\//.test(this._options.path) ? url2.format(this._options) : ( // When making a request to a proxy, […] // a client MUST send the target URI in absolute-form […]. this._options.path @@ -84908,7 +84881,7 @@ var require_follow_redirects = __commonJS({ var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); var currentUrlParts = parseUrl(this._currentUrl); var currentHost = currentHostHeader || currentUrlParts.host; - var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url.format(Object.assign(currentUrlParts, { host: currentHost })); + var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url2.format(Object.assign(currentUrlParts, { host: currentHost })); var redirectUrl = resolveUrl(location, currentUrl); debug4("redirecting to", redirectUrl.href); this._isRedirect = true; @@ -84986,7 +84959,7 @@ var require_follow_redirects = __commonJS({ if (useNativeURL) { parsed = new URL2(input); } else { - parsed = validateUrl(url.parse(input)); + parsed = validateUrl(url2.parse(input)); if (!isString(parsed.protocol)) { throw new InvalidUrlError({ input }); } @@ -84994,7 +84967,7 @@ var require_follow_redirects = __commonJS({ return parsed; } function resolveUrl(relative2, base) { - return useNativeURL ? new URL2(relative2, base) : parseUrl(url.resolve(base, relative2)); + return useNativeURL ? new URL2(relative2, base) : parseUrl(url2.resolve(base, relative2)); } function validateUrl(input) { if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { @@ -90812,25 +90785,25 @@ function parseGitHubUrl(inputUrl) { if (!inputUrl.startsWith("http://") && !inputUrl.startsWith("https://")) { throw new ConfigurationError(`"${originalUrl}" is not a http or https URL`); } - let url; + let url2; try { - url = new URL(inputUrl); + url2 = new URL(inputUrl); } catch { throw new ConfigurationError(`"${originalUrl}" is not a valid URL`); } - if (url.hostname === "github.com" || url.hostname === "api.github.com") { + if (url2.hostname === "github.com" || url2.hostname === "api.github.com") { return GITHUB_DOTCOM_URL; } - if (url.pathname.indexOf("/api/v3") !== -1) { - url.pathname = url.pathname.substring(0, url.pathname.indexOf("/api/v3")); + if (url2.pathname.indexOf("/api/v3") !== -1) { + url2.pathname = url2.pathname.substring(0, url2.pathname.indexOf("/api/v3")); } - if (url.hostname.startsWith("api.")) { - url.hostname = url.hostname.substring(4); + if (url2.hostname.startsWith("api.")) { + url2.hostname = url2.hostname.substring(4); } - if (!url.pathname.endsWith("/")) { - url.pathname = `${url.pathname}/`; + if (!url2.pathname.endsWith("/")) { + url2.pathname = `${url2.pathname}/`; } - return url.toString(); + return url2.toString(); } var ExhaustivityCheckingError = class extends Error { constructor(expectedExhaustiveValue) { @@ -92230,9 +92203,9 @@ async function sendStatusReport(statusReport) { // src/upload-lib.ts var fs11 = __toESM(require("fs")); var path11 = __toESM(require("path")); +var url = __toESM(require("url")); var import_zlib = __toESM(require("zlib")); var core12 = __toESM(require_core()); -var import_file_url = __toESM(require_file_url()); var jsonschema = __toESM(require_lib2()); // src/codeql.ts @@ -92982,10 +92955,10 @@ function writeToolcacheMarkerFile(extractedPath, logger) { fs7.writeFileSync(markerFilePath, ""); logger.info(`Created toolcache marker file ${markerFilePath}`); } -function sanitizeUrlForStatusReport(url) { +function sanitizeUrlForStatusReport(url2) { return ["github/codeql-action", "dsp-testing/codeql-cli-nightlies"].some( - (repo) => url.startsWith(`https://github.com/${repo}/releases/download/`) - ) ? url : "sanitized-value"; + (repo) => url2.startsWith(`https://github.com/${repo}/releases/download/`) + ) ? url2 : "sanitized-value"; } // src/setup-codeql.ts @@ -93076,16 +93049,16 @@ function tryGetBundleVersionFromTagName(tagName, logger) { } return match[1]; } -function tryGetTagNameFromUrl(url, logger) { - const matches = [...url.matchAll(/\/(codeql-bundle-[^/]*)\//g)]; +function tryGetTagNameFromUrl(url2, logger) { + const matches = [...url2.matchAll(/\/(codeql-bundle-[^/]*)\//g)]; if (matches.length === 0) { - logger.debug(`Could not determine tag name for URL ${url}.`); + logger.debug(`Could not determine tag name for URL ${url2}.`); return void 0; } const match = matches[matches.length - 1]; if (match === null || match.length !== 2) { logger.debug( - `Could not determine tag name for URL ${url}. Matched ${JSON.stringify( + `Could not determine tag name for URL ${url2}. Matched ${JSON.stringify( match )}.` ); @@ -93161,13 +93134,13 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian } let cliVersion2; let tagName; - let url; + let url2; if (forceShippedTools) { cliVersion2 = cliVersion; tagName = bundleVersion; } else if (toolsInput !== void 0) { tagName = tryGetTagNameFromUrl(toolsInput, logger); - url = toolsInput; + url2 = toolsInput; if (tagName) { const bundleVersion3 = tryGetBundleVersionFromTagName(tagName, logger); if (bundleVersion3 && semver7.valid(bundleVersion3)) { @@ -93179,9 +93152,9 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian tagName = defaultCliVersion.tagName; } const bundleVersion2 = tagName && tryGetBundleVersionFromTagName(tagName, logger); - const humanReadableVersion = cliVersion2 ?? (bundleVersion2 && convertToSemVer(bundleVersion2, logger)) ?? tagName ?? url ?? "unknown"; + const humanReadableVersion = cliVersion2 ?? (bundleVersion2 && convertToSemVer(bundleVersion2, logger)) ?? tagName ?? url2 ?? "unknown"; logger.debug( - `Attempting to obtain CodeQL tools. CLI version: ${cliVersion2 ?? "unknown"}, bundle tag name: ${tagName ?? "unknown"}, URL: ${url ?? "unspecified"}.` + `Attempting to obtain CodeQL tools. CLI version: ${cliVersion2 ?? "unknown"}, bundle tag name: ${tagName ?? "unknown"}, URL: ${url2 ?? "unspecified"}.` ); let codeqlFolder; if (cliVersion2) { @@ -93263,32 +93236,32 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian } } let compressionMethod; - if (!url) { + if (!url2) { compressionMethod = cliVersion2 !== void 0 && await useZstdBundle(cliVersion2, tarSupportsZstd) ? "zstd" : "gzip"; - url = await getCodeQLBundleDownloadURL( + url2 = await getCodeQLBundleDownloadURL( tagName, apiDetails, compressionMethod, logger ); } else { - const method = inferCompressionMethod(url); + const method = inferCompressionMethod(url2); if (method === void 0) { throw new ConfigurationError( - `Could not infer compression method from URL ${url}. Please specify a URL ending in '.tar.gz' or '.tar.zst'.` + `Could not infer compression method from URL ${url2}. Please specify a URL ending in '.tar.gz' or '.tar.zst'.` ); } compressionMethod = method; } if (cliVersion2) { - logger.info(`Using CodeQL CLI version ${cliVersion2} sourced from ${url} .`); + logger.info(`Using CodeQL CLI version ${cliVersion2} sourced from ${url2} .`); } else { - logger.info(`Using CodeQL CLI sourced from ${url} .`); + logger.info(`Using CodeQL CLI sourced from ${url2} .`); } return { bundleVersion: tagName && tryGetBundleVersionFromTagName(tagName, logger), cliVersion: cliVersion2, - codeqlURL: url, + codeqlURL: url2, compressionMethod, sourceType: "download", toolsVersion: cliVersion2 ?? humanReadableVersion @@ -95627,7 +95600,7 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features const sarifPayload = JSON.stringify(sarif); logger.debug(`Compressing serialized SARIF`); const zippedSarif = import_zlib.default.gzipSync(sarifPayload).toString("base64"); - const checkoutURI = (0, import_file_url.default)(checkoutPath); + const checkoutURI = url.pathToFileURL(checkoutPath).href; const payload = buildPayload( await getCommitOid(checkoutPath), await getRef(), diff --git a/package-lock.json b/package-lock.json index 70692f17b..a11d49614 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,6 @@ "console-log-level": "^1.4.1", "del": "^6.1.1", "fast-deep-equal": "^3.1.3", - "file-url": "^3.0.0", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", @@ -5897,13 +5896,6 @@ "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", "dev": true }, - "node_modules/file-url": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/fill-range": { "version": "7.1.1", "license": "MIT", diff --git a/package.json b/package.json index 2308ac300..6e7cc4ece 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,6 @@ "console-log-level": "^1.4.1", "del": "^6.1.1", "fast-deep-equal": "^3.1.3", - "file-url": "^3.0.0", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", diff --git a/src/upload-lib.ts b/src/upload-lib.ts index 9f4a9f103..e87dad839 100644 --- a/src/upload-lib.ts +++ b/src/upload-lib.ts @@ -1,10 +1,10 @@ import * as fs from "fs"; import * as path from "path"; +import * as url from "url"; import zlib from "zlib"; import * as core from "@actions/core"; import { OctokitResponse } from "@octokit/types"; -import fileUrl from "file-url"; import * as jsonschema from "jsonschema"; import * as actionsUtil from "./actions-util"; @@ -728,7 +728,7 @@ export async function uploadSpecifiedFiles( const sarifPayload = JSON.stringify(sarif); logger.debug(`Compressing serialized SARIF`); const zippedSarif = zlib.gzipSync(sarifPayload).toString("base64"); - const checkoutURI = fileUrl(checkoutPath); + const checkoutURI = url.pathToFileURL(checkoutPath).href; const payload = buildPayload( await gitUtils.getCommitOid(checkoutPath),